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] |
- From: Gabriel Dos Reis
- To: "Seongbae Park"
- Cc: "Joseph S. Myers" , Manuel López-Ibáñez , gcc-patches
- Date: 07 Feb 2007 07:21:35 -0600
- Subject: Re: [PATCH]: Add a new option -Wvariable-length-array
- References: <ab3a61990702061603j22178af4ve67dee9ecc4ff701@mail.gmail.com> <Pine.LNX.4.64.0702070015260.25338@digraph.polyomino.org.uk> <ab3a61990702061619r6c265a5brfa39d7173ce1ef2a@mail.gmail.com> <ab3a61990702061639h7024daddxaba0e86e14c49c22@mail.gmail.com> <6c33472e0702061707i42a3f966u409f7e437adf5671@mail.gmail.com> <ab3a61990702061712s595ee411u5fa9e51835acf033@mail.gmail.com> <Pine.LNX.4.64.0702070132140.25338@digraph.polyomino.org.uk> <ab3a61990702062216l67c33305n9b427ba5ef655f23@mail.gmail.com>
"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
- References:
- [PATCH]: Add a new option -Wvariable-length-array
* From: Seongbae Park - Re: [PATCH]: Add a new option -Wvariable-length-array
* From: Joseph S. Myers - Re: [PATCH]: Add a new option -Wvariable-length-array
* From: Seongbae Park - Re: [PATCH]: Add a new option -Wvariable-length-array
* From: Seongbae Park - Re: [PATCH]: Add a new option -Wvariable-length-array
* From: Manuel López-Ibáñez - Re: [PATCH]: Add a new option -Wvariable-length-array
* From: Seongbae Park - Re: [PATCH]: Add a new option -Wvariable-length-array
* From: Joseph S. Myers - Re: [PATCH]: Add a new option -Wvariable-length-array
* From: Seongbae Park
- [PATCH]: Add a new option -Wvariable-length-array
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |