[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2016-07-18 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic, documentation

--- Comment #14 from Martin Sebor  ---
*** Bug 71925 has been marked as a duplicate of this bug. ***

[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2016-07-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #14 from Martin Sebor  ---
*** Bug 71925 has been marked as a duplicate of this bug. ***

[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-09-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #13 from Marek Polacek  ---
Another case is -Wdeclaration-after-statement:

int
fn (int m)
{
  if (m > 0)
return -1;
  int a;
}


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #12 from Marek Polacek  ---
No problem.  I suspected it was something like that.


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #11 from Chengnian Sun  ---
(In reply to Marek Polacek from comment #10)
> *** Bug 67230 has been marked as a duplicate of this bug. ***

Sorry, Marek. 

I did not realize that I had submitted so many duplicate reports. I got gateway
errors from GCC bugzilla that night when I was submitting this bug report. I
tried several times and it seems they all went through despite the errors.


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #10 from Marek Polacek  ---
*** Bug 67230 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #8 from Marek Polacek  ---
*** Bug 67232 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #9 from Marek Polacek  ---
*** Bug 67231 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #7 from Marek Polacek  ---
*** Bug 67233 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #5 from Marek Polacek  ---
*** Bug 67235 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #4 from Marek Polacek  ---
*** Bug 67236 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #6 from Marek Polacek  ---
*** Bug 67234 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #3 from Marek Polacek  ---
*** Bug 67237 has been marked as a duplicate of this bug. ***


[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

--- Comment #2 from Manuel López-Ibáñez  ---
Moreover, since VLAs are not an extension in C99, the text of Wvla is wrong
always for -std=c99. 

void square(int num) {
  int array[num];
}

With -std=c99 -Wpedantic there is no warning.
With -std=c99 -Wvla, it mentions ISO C90, which is irrelevant.
Clang just says: "variable length array used"

[Bug c/67243] Wrong Message of -Wvla for Standard ISO C90 However Emitted with -std=c11

2015-08-16 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67243

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-08-16
 CC||manu at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Manuel López-Ibáñez  ---
It is also useless to give such warning after such error.

I'm afraid the way GCC reports most extensions is very fragile in this way. It
doesn't affect only Wvla. It would be nice to discuss/design/agree on a
canonical and future-proof way to report:

* Pure GNU extensions, not accepted by any standard.
* Features accepted by some standard but that are extensions for other
standards (like C++ style comments).

The latter requires some future-proof way of reporting:

* Extensions that are forbidden up to a particular standard.

* Extensions that were accepted but are forbidden now (not sure if there is
such case at all).

(It is kind of ironic that Clang is fair more clear pointing out when something
is a "GNU extension". In some way, Clang is doing more promotion of GNU than
GCC!)