This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Request of new __attribute__ for switch statements (elimination of the bounds check)


Michael Matz wrote:
> On Tue, 15 Oct 2002, Jamie Lokier wrote:
> > [... strict enum proposal ...]
> >
> > (It would be appropriate to add a warning when an enum with this
> > attribute is converted to an integer).
> 
> That's not the problematic direction.  I can't see why converting such an
> enum to an integer would be dangerous.  But converting _to_ such an enum
> should get a warning.

Good point.  (I was thinking of enum arithmetic like `CAT | DOG' being
disallowed for strict enums -- I believe that is defined for standard enums).

-- Jamie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]