public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/25897] New: GCC rejects the following strictly conforming code with -ansi -pedantic errors
@ 2006-01-21 7:06 neil at gcc dot gnu dot org
2006-01-21 7:19 ` Andrew Pinski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: neil at gcc dot gnu dot org @ 2006-01-21 7:06 UTC (permalink / raw)
To: gcc-bugs
void foo (const int (*h)[2], int (*i)[2])
{
1 ? h: i;
}
Also rejected in C99 mode.
--
Summary: GCC rejects the following strictly conforming code with
-ansi -pedantic errors
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neil at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25897
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bug c/25897] New: GCC rejects the following strictly conforming code with -ansi -pedantic errors
2006-01-21 7:06 [Bug c/25897] New: GCC rejects the following strictly conforming code with -ansi -pedantic errors neil at gcc dot gnu dot org
@ 2006-01-21 7:19 ` Andrew Pinski
2006-01-21 7:19 ` [Bug c/25897] " pinskia at physics dot uc dot edu
2006-01-21 8:02 ` neil at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2006-01-21 7:19 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/25897] GCC rejects the following strictly conforming code with -ansi -pedantic errors
2006-01-21 7:06 [Bug c/25897] New: GCC rejects the following strictly conforming code with -ansi -pedantic errors neil at gcc dot gnu dot org
2006-01-21 7:19 ` Andrew Pinski
@ 2006-01-21 7:19 ` pinskia at physics dot uc dot edu
2006-01-21 8:02 ` neil at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2006-01-21 7:19 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/25897] GCC rejects the following strictly conforming code with -ansi -pedantic errors
2006-01-21 7:06 [Bug c/25897] New: GCC rejects the following strictly conforming code with -ansi -pedantic errors neil at gcc dot gnu dot org
2006-01-21 7:19 ` Andrew Pinski
2006-01-21 7:19 ` [Bug c/25897] " pinskia at physics dot uc dot edu
@ 2006-01-21 8:02 ` neil at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: neil at gcc dot gnu dot org @ 2006-01-21 8:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from neil at gcc dot gnu dot org 2006-01-21 08:02 -------
Discussing with pinskia, I believe qualifying the array type is intended to be
viewed as qualifying the element type, not the array, so the example is
invalid.
--
neil at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25897
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-21 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-21 7:06 [Bug c/25897] New: GCC rejects the following strictly conforming code with -ansi -pedantic errors neil at gcc dot gnu dot org
2006-01-21 7:19 ` Andrew Pinski
2006-01-21 7:19 ` [Bug c/25897] " pinskia at physics dot uc dot edu
2006-01-21 8:02 ` neil at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).