[Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror

2021-07-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37187

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |5.0
 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #7 from Andrew Pinski  ---
So this was fixed in GCC 5 because it is an exact dup of bug 60139.

*** This bug has been marked as a duplicate of bug 60139 ***

[Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror

2012-04-22 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37187

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||diagnostic
 Target|x86_64-linux-gnu|
   Host|x86_64-linux-gnu|
  Build|x86_64-linux-gnu|

--- Comment #6 from Manuel López-Ibáñez manu at gcc dot gnu.org 2012-04-22 
20:03:11 UTC ---
In GCC 4.8, you can use -Wno-error=pedantic for any warning that prints
-Wpedantic. However, the testcase here does not because of a bug. I will try to
fix the bug, but this part of the C FE is quite complex (and it looks
ancient...)

-pedantic changes something in a global variable and later the pedwarn is
conditional on this global variable, so depending on the testcase, the pedwarn
may be conditional or not on -pedantic (without passing the correct OPT_
value). Not fun.


[Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror

2011-11-18 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37187

Daniel Richard G. skunk at iskunk dot org changed:

   What|Removed |Added

 CC||skunk at iskunk dot org

--- Comment #5 from Daniel Richard G. skunk at iskunk dot org 2011-11-18 
20:06:13 UTC ---
There is still no way to defang -pedantic warnings with -Werror as of GCC
4.6.1.


[Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror

2008-08-22 Thread manu at gcc dot gnu dot org


--- Comment #4 from manu at gcc dot gnu dot org  2008-08-22 12:16 ---
The PR for (2) is PR 37200.

This concerns (1) and (3).


-- 


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



[Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror

2008-08-21 Thread edwintorok at gmail dot com


--- Comment #1 from edwintorok at gmail dot com  2008-08-21 13:26 ---
Also -fdiagnostics-show-option doesn't show that the error is coming from
-pedantic:
$ gcc -Werror -pedantic x.c -c -fdiagnostics-show-option
cc1: warnings being treated as errors
x.c: In function ‘foo’:
x.c:10: error: initializer element is not computable at load time
x.c:10: error: initializer element is not computable at load time

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-9'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-9)


-- 


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



[Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror

2008-08-21 Thread manu at gcc dot gnu dot org


--- Comment #2 from manu at gcc dot gnu dot org  2008-08-21 16:12 ---
This is confirmed in trunk. Weird because the pedwarn is not conditional on
pedantic, so it should be given even without pedantic. This means that
-pedantic is changing something at a higher level.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||manu at gcc dot gnu dot org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-21 16:12:08
   date||


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



[Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror

2008-08-21 Thread manu at gcc dot gnu dot org


--- Comment #3 from manu at gcc dot gnu dot org  2008-08-21 18:04 ---
There are several bugs here:

1) -Wno-error=pendatic does not work. But neither does -Werror=pedantic or
-no-pedantic, so this is a feature request. We would need to implement
-Wpedantic as a synonym of -pedantic. I have been thinking about doing this for
a while anyway just for consistency. However, -pedantic-errors is not
equivalent to -Werror=pedantic, so not sure in which direction should the
inconsistency be solved.

2) The duplicated messages. This seems hard to fix: too many jumps around, too
many global variables being used...

x.c:10: warning: initializer element is not computable at load time
x.c:10: warning: initializer element is not computable at load time

3) -fdiagnostics-show-option does not show [-pedantic]. This is easy to fix.


-- 


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