[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: [Pcc] Another _Generic bug
From:       Anders Magnusson <ragge () ludd ! ltu ! se>
Date:       2016-01-24 10:16:25
Message-ID: 56A4A479.1010005 () ludd ! ltu ! se
[Download RAW message or body]

Den 2016-01-24 kl. 01:51, skrev Fred J. Tydeman:
> This should be valid code.  Yet, pcc thinks that there is a duplicate type.
>
> int main(void){
>    int i;
>    i = _Generic('5',     /* 6.4.4.4#10 char constants have type int */
>                 char: 1,
>                 signed char: 2,
>                 unsigned char: 3,
>                 int: 4,
>                 default: 0);
>    return i;
> }
>
Yep, unfortunately I am aware of this :-/
I think there are somewhere else also that char/schar/uchar should be 
treated different but are not.

To fix it a bunch of logic in the compiler must be changed, so it is not 
a simple fix.

I'll put this bug report in Jira as a placeholder for future fixes.

-- Ragge
_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
https://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic