This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20519] New: [4.0/4.1 regression] completed type not selected properly with typeof
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2005 14:37:18 -0000
- Subject: [Bug c/20519] New: [4.0/4.1 regression] completed type not selected properly with typeof
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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