lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] [bug #35875] #define ⇒ enum?


From: Simon Goldschmidt
Subject: Re: [lwip-devel] [bug #35875] #define ⇒ enum?
Date: Mon, 19 Mar 2012 16:25:58 +0100

David Brown <address@hidden> wrote:
> Yes indeed - and the compiler will do exactly the same with an enum as
> with a #define'd value (and in most cases, also with a "static const").
>  My point was not that a #define'd value was bad because it is a true
> "int", but that it is no different from an enum.

I'm reading from this that there is a proposal to define the values as enum but 
not use the enum as a type anywhere (only its -const- values)? That would 
probably not generate different binary code than using defines - and would 
probably work on C compilers. However, I'm not sure, but we might indeed need 
additional casts to compile the sources as C++ then (which is a requirement, 
for me).

Simon
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                          
        
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a



reply via email to

[Prev in Thread] Current Thread [Next in Thread]