public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18479] New: __attribute__ ((visibility("default"))) in C causes internal compiler error
@ 2004-11-14 17:38 s_gccbugzilla at nedprod dot com
  2004-11-14 17:38 ` [Bug c/18479] " s_gccbugzilla at nedprod dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: s_gccbugzilla at nedprod dot com @ 2004-11-14 17:38 UTC (permalink / raw)
  To: gcc-bugs

Using GCC v4.0_20041107 on FreeBSD v5.3:

struct __attribute__ ((visibility("default"))) Foo { int foo; };
int main(void) { Foo foo; return 0; }

If compiled as a C++ file, all is fine. If compiled as C you get:

internal compiler error: tree check: expected class 'declaration', have 
'exceptional' (identifier_node) in handle_visibility_attribute, at c-common.c:
4648
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

I think it's perfectly valid for C code to mark structures as having visibility 
though it means nothing useful (so it could simply be ignored). It certainly 
shouldn't generate an internal compiler error.

Cheers,
Niall

-- 
           Summary: __attribute__ ((visibility("default"))) in C causes
                    internal compiler error
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: s_gccbugzilla at nedprod dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-11-29 23:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-14 17:38 [Bug c++/18479] New: __attribute__ ((visibility("default"))) in C causes internal compiler error s_gccbugzilla at nedprod dot com
2004-11-14 17:38 ` [Bug c/18479] " s_gccbugzilla at nedprod dot com
2004-11-14 17:40 ` [Bug c/18479] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-26  0:52 ` pinskia at gcc dot gnu dot org
2004-11-26  0:55 ` pinskia at gcc dot gnu dot org
2004-11-29 23:11 ` pinskia at gcc dot gnu dot org
2004-11-29 23:11 ` cvs-commit 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).