tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Redefined and undefined enums


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Redefined and undefined enums
Date: Fri, 20 Sep 2013 21:22:31 +0200
User-agent: KMail/4.10.5 (Linux/3.10-2-amd64; KDE/4.10.5; x86_64; ; )

Le mercredi 21 août 2013 11:29:13 address@hidden a écrit :
> [2] no error reported when using undefined enum.
> 
> $ tcc -run -
> enum color { RED, GREEN, BLUE };
> int main()
> {
>         enum rgb c=BLUE;        /* undefined enum */
>         enum color d=GREEN;
>         printf("c=%d,d=%d\n", c, d);
>         return 0;
> }
> c=2,d=1

Fixed in the mob branch as of commit cdb1ad76549e5a5140025699e6edf1f9bf516bc0. 
But for now tcc will happily create two enum with overlapping "members" (I'm 
not sure of the word). So you could have enum rgb and enum color defined with 
as both RED, GREEN, BLUE and tcc wouldn't complain.

Thanks again John for the bug report.

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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