public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror
       [not found] <bug-37187-4@http.gcc.gnu.org/bugzilla/>
@ 2011-11-18 20:11 ` skunk at iskunk dot org
  2012-04-22 20:03 ` manu at gcc dot gnu.org
  2021-07-29 17:26 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 7+ messages in thread
From: skunk at iskunk dot org @ 2011-11-18 20:11 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror
       [not found] <bug-37187-4@http.gcc.gnu.org/bugzilla/>
  2011-11-18 20:11 ` [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror skunk at iskunk dot org
@ 2012-04-22 20:03 ` manu at gcc dot gnu.org
  2021-07-29 17:26 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu.org @ 2012-04-22 20:03 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror
       [not found] <bug-37187-4@http.gcc.gnu.org/bugzilla/>
  2011-11-18 20:11 ` [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror skunk at iskunk dot org
  2012-04-22 20:03 ` manu at gcc dot gnu.org
@ 2021-07-29 17:26 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-29 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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 ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror
  2008-08-21 13:26 [Bug c/37187] New: " edwintorok at gmail dot com
                   ` (2 preceding siblings ...)
  2008-08-21 18:05 ` manu at gcc dot gnu dot org
@ 2008-08-22 12:17 ` manu at gcc dot gnu dot org
  3 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-22 12:17 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror
  2008-08-21 13:26 [Bug c/37187] New: " edwintorok at gmail dot com
  2008-08-21 13:28 ` [Bug c/37187] " edwintorok at gmail dot com
  2008-08-21 16:13 ` manu at gcc dot gnu dot org
@ 2008-08-21 18:05 ` manu at gcc dot gnu dot org
  2008-08-22 12:17 ` manu at gcc dot gnu dot org
  3 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-21 18:05 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror
  2008-08-21 13:26 [Bug c/37187] New: " edwintorok at gmail dot com
  2008-08-21 13:28 ` [Bug c/37187] " edwintorok at gmail dot com
@ 2008-08-21 16:13 ` manu at gcc dot gnu dot org
  2008-08-21 18:05 ` manu at gcc dot gnu dot org
  2008-08-22 12:17 ` manu at gcc dot gnu dot org
  3 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-21 16:13 UTC (permalink / raw)
  To: gcc-bugs



------- 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|0000-00-00 00:00:00         |2008-08-21 16:12:08
               date|                            |


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror
  2008-08-21 13:26 [Bug c/37187] New: " edwintorok at gmail dot com
@ 2008-08-21 13:28 ` edwintorok at gmail dot com
  2008-08-21 16:13 ` manu at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: edwintorok at gmail dot com @ 2008-08-21 13:28 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]



------- 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-29 17:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-37187-4@http.gcc.gnu.org/bugzilla/>
2011-11-18 20:11 ` [Bug c/37187] please provide a way to treat -pedantic as warning when using -Werror skunk at iskunk dot org
2012-04-22 20:03 ` manu at gcc dot gnu.org
2021-07-29 17:26 ` pinskia at gcc dot gnu.org
2008-08-21 13:26 [Bug c/37187] New: " edwintorok at gmail dot com
2008-08-21 13:28 ` [Bug c/37187] " edwintorok at gmail dot com
2008-08-21 16:13 ` manu at gcc dot gnu dot org
2008-08-21 18:05 ` manu at gcc dot gnu dot org
2008-08-22 12:17 ` manu at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).