* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
@ 2008-10-17 22:36 ` pinskia at gcc dot gnu dot org
2008-10-17 22:38 ` flameeyes at gentoo dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-10-17 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-10-17 22:34 -------
That is because this is a pedantic warning which is enabled by default.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
2008-10-17 22:36 ` [Bug c/37866] " pinskia at gcc dot gnu dot org
@ 2008-10-17 22:38 ` flameeyes at gentoo dot org
2008-11-13 17:21 ` flameeyes at gentoo dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: flameeyes at gentoo dot org @ 2008-10-17 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from flameeyes at gentoo dot org 2008-10-17 22:36 -------
Which gives it even more usefulness to be optionally treated as an error, since
it really helps to avoid shooting oneself in the foot...
I guess it would be bad to have a way to -Wno- it, but it would be nice to at
least being able to -Werror= it...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
2008-10-17 22:36 ` [Bug c/37866] " pinskia at gcc dot gnu dot org
2008-10-17 22:38 ` flameeyes at gentoo dot org
@ 2008-11-13 17:21 ` flameeyes at gentoo dot org
2008-12-02 15:34 ` viktor dot bachraty at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: flameeyes at gentoo dot org @ 2008-11-13 17:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from flameeyes at gentoo dot org 2008-11-13 17:20 -------
The same happens for "assignment makes integer from pointer without a cast" .
It really is not nice that these warnings cannot be made errors explicitly,
they are _quite_ important.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
` (2 preceding siblings ...)
2008-11-13 17:21 ` flameeyes at gentoo dot org
@ 2008-12-02 15:34 ` viktor dot bachraty at gmail dot com
2009-07-06 16:48 ` manu at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: viktor dot bachraty at gmail dot com @ 2008-12-02 15:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from viktor dot bachraty at gmail dot com 2008-12-02 15:33 -------
I had some issues caused by implicit pointer casting as well. Would be really
nice to be able to separately turn specific classes of pedantic warnings into
errors without having to turn every warning.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
` (3 preceding siblings ...)
2008-12-02 15:34 ` viktor dot bachraty at gmail dot com
@ 2009-07-06 16:48 ` manu at gcc dot gnu dot org
2009-07-06 17:04 ` flameeyes at gentoo dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-07-06 16:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from manu at gcc dot gnu dot org 2009-07-06 16:48 -------
We could add an OPT_Wdefault that replaces 0 in pedwarn(loc, 0, "message"),
then -Werror=default would turn all default warnings into errors. And
-Wno-default will turn off default warnings that cannot be currently
controlled.
Diego, would that satisfy you?
If we want further fine control, we would need to add further -Wxxx options for
specific default warnings.
--
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 |2009-07-06 16:48:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
` (4 preceding siblings ...)
2009-07-06 16:48 ` manu at gcc dot gnu dot org
@ 2009-07-06 17:04 ` flameeyes at gentoo dot org
2009-09-09 23:30 ` rsc at swtch dot com
2009-09-10 15:15 ` manu at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: flameeyes at gentoo dot org @ 2009-07-06 17:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from flameeyes at gentoo dot org 2009-07-06 17:03 -------
To be honest there are quite a few default warnings that I wouldn't want to
turn into errors, but it would still be better than having _no_ way to get this
into an error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
` (5 preceding siblings ...)
2009-07-06 17:04 ` flameeyes at gentoo dot org
@ 2009-09-09 23:30 ` rsc at swtch dot com
2009-09-10 15:15 ` manu at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rsc at swtch dot com @ 2009-09-09 23:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rsc at swtch dot com 2009-09-09 23:30 -------
There is a difference between warnings about things that might
be wrong in your code and warnings about things that are definitely wrong.
This is one of the latter, and it is a shame that it's not already an error
by default. I understand the historical rationale but it is still unfortunate.
integer/pointer without a cast is another one. If I could make these
errors I most certainly would. As it is I run gcc in a wrapper script
and exit 1 if gcc emits that particular warning.
--
rsc at swtch dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsc at swtch dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/37866] "passing argument from incompatible pointer type" warning cannot be passed to -Werror=
2008-10-17 22:25 [Bug c/37866] New: "passing argument from incompatible pointer type" warning cannot be passed to -Werror= flameeyes at gentoo dot org
` (6 preceding siblings ...)
2009-09-09 23:30 ` rsc at swtch dot com
@ 2009-09-10 15:15 ` manu at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-09-10 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from manu at gcc dot gnu dot org 2009-09-10 15:14 -------
Pedantic warnings may be controlled by individual warning flags. So to fix this
you only need to:
* add a new -Wfoo option to c.opt that is enabled by default.
* use the option in the appropriate warning calls in c-typeck.c
* create some testcases to show that it works.
* get the patch reviewed and committed.
Patches welcome: http://gcc.gnu.org/contribute.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37866
^ permalink raw reply [flat|nested] 9+ messages in thread