public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20519] New: [4.0/4.1 regression] completed type not selected properly with typeof
@ 2005-03-17 14:38 rth at gcc dot gnu dot org
  2005-03-17 14:52 ` [Bug c/20519] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-03-17 14:38 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

const char foo[] = "libc";
extern __typeof (foo) bar __attribute__((alias ("foo")));
int s1 = sizeof foo;
int s2 = sizeof bar;

yields

z.c:4: error: invalid application of ‘sizeof’ to incomplete type ‘const char[]’

with 4.0 and HEAD.  Compiles successfully with 3.2.3 and 3.4.4.  Also compiles
successfully with 4.0 and HEAD with -Dconst=''.  That is, the failure goes away
if we remove const from the picture.

-- 
           Summary: [4.0/4.1 regression] completed type not selected
                    properly with typeof
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,roland at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20519


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-03-30  1:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-17 14:38 [Bug c/20519] New: [4.0/4.1 regression] completed type not selected properly with typeof rth at gcc dot gnu dot org
2005-03-17 14:52 ` [Bug c/20519] " pinskia at gcc dot gnu dot org
2005-03-17 14:56 ` rth at gcc dot gnu dot org
2005-03-17 16:14 ` rth at gcc dot gnu dot org
2005-03-17 16:20 ` pinskia at gcc dot gnu dot org
2005-03-17 16:25 ` joseph at codesourcery dot com
2005-03-17 22:03 ` rth at gcc dot gnu dot org
2005-03-30  1:35 ` cvs-commit at gcc dot gnu dot org
2005-03-30  1:38 ` cvs-commit at gcc dot gnu dot org
2005-03-30  1:46 ` rth 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).