This is the mail archive of the gcc-bugs@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: [Bug c/25897] New: GCC rejects the following strictly conforming code with -ansi -pedantic errors


> 
> void foo (const int (*h)[2], int (*i)[2])
> {
>   1 ? h: i;
> }
> 
> Also rejected in C99 mode.

ICC warns:
t.c(3): warning #42: operand types are incompatible ("const int (*)[2]" and "int (*)[2]")

So maybe this is not valid C, I don't know.


-- Pinski


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