int test(int* A, int B) { return A < B; }

$  gcc t.c -fsyntax-only -pedantic -ansi -std=c99
t.c: In function 'test':
t.c:3: warning: comparison between pointer and integer

According to C99 6.5.8p2, this should be rejected.

-Chris


-- 
           Summary: invalid C99 code accepted with warning
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sabre at nondot dot org


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

Reply via email to