On Tue, Feb 16, 2010 at 12:03 PM, Isaac Dupree
<m...@isaac.cedarswampstudios.org> wrote:
> On 02/16/10 10:52, Michal Suchanek wrote:
>>>
>>> enum allows it just fine
>>
>> Not here:
>>
>> typedef enum t1 { BTI1 = 1,
>
> typo, should be "BIT1". then it works. (In C.  Also remember not to get
> confused by the fact that it doesn't work in C++, for type-related reasons

Says who?

Comeau is perfectly happy with this code, in strict C++ mode:

enum flags
{
  BIT1 = 1,
  BIT2 = 2,
  BIT12 = BIT1 | BIT2
};

int main(int argc, char** argv) { return 0 ; }


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to