This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25897] GCC rejects the following strictly conforming code with -ansi -pedantic errors
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2006 07:19:07 -0000
- Subject: [Bug c/25897] GCC rejects the following strictly conforming code with -ansi -pedantic errors
- References: <bug-25897-6@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-21 07:19 -------
Subject: Re: 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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25897