public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/7654] -Wenum-assignment : Warn if an enum is being assigned a non enum value
       [not found] <bug-7654-1366@http.gcc.gnu.org/bugzilla/>
@ 2008-02-15 10:25 ` manu at gcc dot gnu dot org
  2008-02-15 10:36 ` [Bug c/7654] warn " manu at gcc dot gnu dot org
  2008-08-24 21:32 ` manu at gcc dot gnu dot org
  2 siblings, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-02-15 10:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from manu at gcc dot gnu dot org  2008-02-15 10:24 -------
*** Bug 35207 has been marked as a duplicate of this bug. ***


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |venk2ksubbu at gmail dot com


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


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

* [Bug c/7654] warn if an enum is being assigned a non enum value
       [not found] <bug-7654-1366@http.gcc.gnu.org/bugzilla/>
  2008-02-15 10:25 ` [Bug c/7654] -Wenum-assignment : Warn if an enum is being assigned a non enum value manu at gcc dot gnu dot org
@ 2008-02-15 10:36 ` manu at gcc dot gnu dot org
  2008-08-24 21:32 ` manu at gcc dot gnu dot org
  2 siblings, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-02-15 10:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from manu at gcc dot gnu dot org  2008-02-15 10:36 -------
It is not clear whether we want such a warning or not (and in 6 years, just 2
people have suggested it not too loudly). But if we do:

* -Wstrict-enums seems a better name. It should be consistent and not handle
only assignments but also argument passing.
* An explicit cast should suppress the warning.
* The warning should not be enabled by -Wall and probably neither by -Wextra
because enums are *correctly* used as integers by C programmers.

It is also unclear whether we want to warn for any integer/enum assigned to a
different enum type or just for integers/enums outside the range of a
particular enum type.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-Wenum-assignment : Warn if |warn if an enum is being
                   |an enum is being assigned a |assigned a non enum value
                   |non enum value              |


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


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

* [Bug c/7654] warn if an enum is being assigned a non enum value
       [not found] <bug-7654-1366@http.gcc.gnu.org/bugzilla/>
  2008-02-15 10:25 ` [Bug c/7654] -Wenum-assignment : Warn if an enum is being assigned a non enum value manu at gcc dot gnu dot org
  2008-02-15 10:36 ` [Bug c/7654] warn " manu at gcc dot gnu dot org
@ 2008-08-24 21:32 ` manu at gcc dot gnu dot org
  2 siblings, 0 replies; 3+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-24 21:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from manu at gcc dot gnu dot org  2008-08-24 21:31 -------
I think we should mark as SUSPENDED those enhancement requests where there is
no consensus that we actually want the feature, even if a patch were available.
It would be a waste of time to implement this just to have it rejected.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


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


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

end of thread, other threads:[~2008-08-24 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-7654-1366@http.gcc.gnu.org/bugzilla/>
2008-02-15 10:25 ` [Bug c/7654] -Wenum-assignment : Warn if an enum is being assigned a non enum value manu at gcc dot gnu dot org
2008-02-15 10:36 ` [Bug c/7654] warn " manu at gcc dot gnu dot org
2008-08-24 21:32 ` 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).