http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56910
Bug #: 56910 Summary: Syntax error seemingly sneaks through gcc Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: da...@model.com I'm not sure if the following code is triggering some obscure extension to gcc or not, but it sure seems like it should generate a syntax error (it does in all other compilers I've tried). --- cut here (z.c) --- typedef int int32_t; typedef unsigned int uint32_t; #include <stdio.h> extern void vl_create_cell_reg( int32_t reg_idx, int32_t state_idx, uint32_t CR_flags, uint32_t init_val, char *name; /* <--- this parameter is missing in the body and contains a spurious ';' */ ); void vl_create_cell_reg( int32_t reg_idx, int32_t state_idx, uint32_t CR_flags, uint32_t init_val ) { } --- cut here (end of z.c) --- If I cut/paste this source to a file called "z.c", it compiles fine, i.e.: $ gcc -c -Wall -Werror z.c << no errors/warnings reported >> Note, if I remove the spurious ';', I get the expected error: $ gcc -c -Wall -Werror z.c z.c:15:6: error: conflicting types for ‘vl_create_cell_reg’ z.c:7:13: note: previous declaration of ‘vl_create_cell_reg’ was here