public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8905: Function attributes for C++ constructors confuses g++ frontend
@ 2002-12-11 15:31 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-12-11 15:31 UTC (permalink / raw)
  To: Sonal.Santan, gcc-bugs, gcc-prs, nobody

Synopsis: Function attributes for C++ constructors confuses g++ frontend

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed Dec 11 15:31:03 2002
State-Changed-Why:
    This is a duplicate of PR 6992. The new parser which
    will hopefully be in gcc3.4 will handle this correctly,
    but it will probably not be fixed in gcc3.3 or 3.2.2.
    
    W.

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


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

* c++/8905: Function attributes for C++ constructors confuses g++ frontend
@ 2002-12-11 15:16 Sonal.Santan
  0 siblings, 0 replies; 2+ messages in thread
From: Sonal.Santan @ 2002-12-11 15:16 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8905
>Category:       c++
>Synopsis:       Function attributes for C++ constructors confuses g++ frontend
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 11 15:16:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sonal.Santan@xilinx.com
>Release:        gcc version 3.2.1 (MinGW special 20021202-2)
>Organization:
>Environment:
Reading specs from C:/Local/MingW/bin/../lib/gcc-lib/mingw32/3.2.1/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 
-target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,objc --disable-win32-registry --disable-shared --enable-sjlj-exceptions
Thread model: win32

Operating System Win2000 SP2 i586
>Description:
Putting __attribute__((dllexport))  infront of a C++ class constructor confuses the frontend. Moving it to the end of the constructor fixes the problem. Typical output is:

C:\sonals\scratch>g++ -c export.cpp
export.cpp:5: parse error before `const'
export.cpp:7: warning: `dllexport' attribute ignored
export.cpp:7: declaration does not declare anything
export.cpp:7: parse error before `)' token
export.cpp:24: prototype for `MyExpo::MyExpo(const char*)' does not match any
   in class `MyExpo'
export.cpp:1: candidates are: MyExpo::MyExpo()
export.cpp:1:                 MyExpo::MyExpo(const MyExpo&)
export.cpp:29: definition of implicitly-declared `MyExpo::MyExpo()'
export.cpp:29: declaration of `MyExpo::MyExpo()' throws different exceptions
export.cpp:1: than previous declaration `MyExpo::MyExpo() throw ()'
>How-To-Repeat:
g++ -c export.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="export.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="export.cpp"

Y2xhc3MgTXlFeHBvIHsNCnB1YmxpYzoNCiAgICBfX2F0dHJpYnV0ZV9fKChkbGxleHBvcnQpKSB2
b2lkIE1ldGhvZDEoY29uc3QgY2hhciAqKTsNCiAgICBfX2F0dHJpYnV0ZV9fKChkbGxleHBvcnQp
KSB2b2lkIE1ldGhvZDIoY29uc3QgaW50KTsNCiAgICBfX2F0dHJpYnV0ZV9fKChkbGxleHBvcnQp
KSBNeUV4cG8oY29uc3QgY2hhciAqKTsgLy8gdHJvdWJsZSBoZXJlDQpwcml2YXRlOg0KICAgIF9f
YXR0cmlidXRlX18oKGRsbGV4cG9ydCkpIE15RXhwbygpOyAvLyB0cm91YmxlIGhlcmUNCg0KfTsg
DQoNCnZvaWQgTXlFeHBvOjpNZXRob2QxKGNvbnN0IGNoYXIgKiBjKQ0Kew0KDQp9DQoNCnZvaWQg
TXlFeHBvOjpNZXRob2QyKGNvbnN0IGludCBpKQ0Kew0KDQp9DQoNCk15RXhwbzo6TXlFeHBvKGNv
bnN0IGNoYXIgKiBjKQ0Kew0KDQp9DQoNCk15RXhwbzo6TXlFeHBvKCkNCnsNCg0KfQ0K


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

end of thread, other threads:[~2002-12-11 23:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-11 15:31 c++/8905: Function attributes for C++ constructors confuses g++ frontend bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-12-11 15:16 Sonal.Santan

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