Gabriel Dos Reis - Re: [PATCH]: Add a new option -Wvariable-length-array (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

"Seongbae Park" seongbae.park@gmail.com writes:

| On 2/6/07, Joseph S. Myers joseph@codesourcery.com wrote: | > On Tue, 6 Feb 2007, Seongbae Park wrote: | > | > > Thanks to Joseph's comment, now the logic is different - | > > -pedantic overrides -Wno-variable-length-array, | > > and they have different messages so they are not identical. | > | > My comment was about -pedantic-errors -Wvariable-length-array, not about | > the -Wno-variable-length-array case. | > | > I agree that -Wno-variable-length-array should disable the diagnostic from | > -pedantic/-pedantic-errors. | > | > -- | > Joseph S. Myers | > joseph@codesourcery.com | | Ok. Does the following behavior look reasonable ? | | # cat vla.c | int test(int i, char a[i]);

[...]

| $gcc vla.c -c -Wvariable-length-array

[...]

| I'll send out a patch if this looks reasonable.

You need a testcase for when -std=c99 too.
Please give a shorter name to the flag: -Wvla, for example.

-- Gaby


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