public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/6800: bad warnings for flexible arrays
@ 2002-05-28 10:07 rth
0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-05-28 10:07 UTC (permalink / raw)
To: davem, gcc-bugs, gcc-prs, nobody
Synopsis: bad warnings for flexible arrays
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Tue May 28 09:56:18 2002
State-Changed-Why:
It doesn't warn, it errors. And what did you expect, anyway?
When's the last time array assignment was defined in C?
You get the same errors from a fixed size array.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6800
^ permalink raw reply [flat|nested] 2+ messages in thread
* c/6800: bad warnings for flexible arrays
@ 2002-05-24 10:56 davem
0 siblings, 0 replies; 2+ messages in thread
From: davem @ 2002-05-24 10:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 6800
>Category: c
>Synopsis: bad warnings for flexible arrays
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 24 10:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: davem@redhat.com
>Release: 3.1
>Organization:
>Environment:
sparc-unknown-linux
>Description:
Operations, such as __typeof__(f->bar) warn
when the 'bar' member of 'f' is a flexible
array.
See attachment source, it warns:
? gcc -c -o flex.o flex.c
flex.c: In function `bar':
flex.c:8: array initialized from non-constant array expression
flex.c:8: storage size of `b' isn't known
>How-To-Repeat:
gcc -c -o flex.o flex.c
>Fix:
Shrug... don't use flexible arrays :-)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="flex.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="flex.c"
c3RydWN0IGZvbyB7CglpbnQgeDsKCWludCBhW107Cn07Cgp2b2lkICpiYXIoc3RydWN0IGZvbyAq
cCkKewoJX190eXBlb2ZfXyhwLT5hKSBiID0gcC0+YTsKCglyZXR1cm4gYiArIDE7Cn0K
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-28 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-28 10:07 c/6800: bad warnings for flexible arrays rth
-- strict thread matches above, loose matches on Subject: below --
2002-05-24 10:56 davem
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).