This is the mail archive of the gcc-bugs@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]

[Bug c/25504] -ansi -Wall should warn about variable-size arrays



------- Comment #4 from giles at xiph dot org  2005-12-20 18:46 -------
I think you misunderstood. This is not about rejecting C99 code, this about
warning about portability. I understand it is a C99 feature as well as an
long-standing gnu extension, and -pedantic doesn't reject the program, it just
prints a warning.

If the correct was to generate warnings for source that isn't compliant to the
selected standard (and the documentation says -ansi is the same as -std=c89) is
to include -pedantic then the documentation should say so.

If, as the name suggests, -pedantic is for issues that aren't likely to trouble
one in practice, then either '-ansi -Wall' or vanilla '-ansi' should warn about
this C99 feature precisely because it is not portable to another major compiler
in common use. This would provides helpful assistance to programmers and reduce
the number of portability bugs people must file, track down, and fix.

If one were happy with the portability of the default gnu89 or gnu99 C, one
wouldn't be adding -ansi to the commandline. :P


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]