This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Tom Schutter <tom@platte.com> wrote:The code in baz() is perfectly legal since ISO C++ allows voidGiven this program: static void foo(void) { return(1); } static void bar(void) { } static void baz(void) { return(bar()); } int main(int argc, char * argv[]) { baz(); return(1); }
returns. -pedantic should not warn about it because it is not a GCC extension
at all. Would you please file a bugreport about the incorrect warning emitted
for baz()?
That looks like a C program to me, and it is not valid in C. I don't know why it only warns sometimes, though.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |