When used with -V option, g++ return status is 0 even when the input file fails
to compile. 

Example : 

Program :
=================================
int mult(int a, int b)
{
  dsss;

  int y = a * b;
  return y;
}


Command :

g++ -V 4.4.3 -c -Wall -pipe --no-exceptions -fPIC -ggdb mult.cc -o mult.o

mult.cc: In function ‘int mult(int, int)’:
mult.cc:5: error: ‘dsss’ was not declared in this scope
sf6:/home/parvizf/tmp/make_test> echo $?
0

Note the return value of 0.

If compiled without the -V, the return value is 1


-- 
           Summary: Wrong return value on error
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: parviz_fariborz at mentor dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44990

Reply via email to