public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/4754: problem with nested extern "C"
@ 2001-10-31  5:46 markus
  0 siblings, 0 replies; 2+ messages in thread
From: markus @ 2001-10-31  5:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4754
>Category:       c++
>Synopsis:       problem with nested extern "C"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 31 05:46:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Markus Heichel
>Release:        3.0.2
>Organization:
>Environment:
System: Linux wave 2.4.13 #1 SMP Thu Oct 25 14:26:17 CEST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: configure --enable-shared --enable-threads --enable-languages=c++
>Description:
compiling the attached example gives an error:

> c++ extern.cc
extern.cc:5: storage class specified for field `i'
Exit 1
>How-To-Repeat:
c++ extern.cc
>Fix:
omit the second 'extern "C"' or use brackets around the definition of 'struct Test'
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="extern.cc"
Content-Disposition: inline; filename="extern.cc"

extern "C"
{
    extern "C" struct Test
    {
        int i;
    };
}

int main()
{
}


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

* Re: c++/4754: problem with nested extern "C"
@ 2003-01-03 16:09 neroden
  0 siblings, 0 replies; 2+ messages in thread
From: neroden @ 2003-01-03 16:09 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, markus, nobody

Synopsis: problem with nested extern "C"

State-Changed-From-To: analyzed->closed
State-Changed-By: neroden
State-Changed-When: Fri Jan  3 08:09:04 2003
State-Changed-Why:
    It compiles now. :-)  Testcase in g++.dg/parse/extern-C-1.C

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4754


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

end of thread, other threads:[~2003-01-03 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-31  5:46 c++/4754: problem with nested extern "C" markus
2003-01-03 16:09 neroden

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).