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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread

* [Bug c/7654] -Wenum-assignment : Warn if an enum is being assigned a non enum value
       [not found] <20020820073604.7654.ac131313@redhat.com>
  2003-07-18 23:23 ` [Bug c/7654] -Wenum-assignment : Warn " dhazeghi at yahoo dot com
@ 2003-08-04  1:22 ` pinskia at physics dot uc dot edu
  1 sibling, 0 replies; 5+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-04  1:22 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW


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

* [Bug c/7654] -Wenum-assignment : Warn if an enum is being assigned a non enum value
       [not found] <20020820073604.7654.ac131313@redhat.com>
@ 2003-07-18 23:23 ` dhazeghi at yahoo dot com
  2003-08-04  1:22 ` pinskia at physics dot uc dot edu
  1 sibling, 0 replies; 5+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-07-18 23:23 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-18 23:23:28
               date|                            |
            Version|unknown                     |3.4


------- Additional Comments From dhazeghi at yahoo dot com  2003-07-18 23:23 -------
No such flag yet on mainline or branch, not anything analogous...


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

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

Thread overview: 5+ 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
     [not found] <20020820073604.7654.ac131313@redhat.com>
2003-07-18 23:23 ` [Bug c/7654] -Wenum-assignment : Warn " dhazeghi at yahoo dot com
2003-08-04  1:22 ` pinskia at physics dot uc dot edu

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