public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3650: unnamed temporary gives: type specifier omitted for parameter
@ 2001-11-05 11:26 lerdsuwa
0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2001-11-05 11:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/3650; it has been noted by GNATS.
From: lerdsuwa@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
mstevens@cra.com, nobody@gcc.gnu.org
Cc:
Subject: Re: c++/3650: unnamed temporary gives: type specifier omitted for parameter
Date: 16 Nov 2001 17:42:03 -0000
Synopsis: unnamed temporary gives: type specifier omitted for parameter
State-Changed-From-To: open->suspended
State-Changed-By: lerdsuwa
State-Changed-When: Fri Nov 16 09:42:02 2001
State-Changed-Why:
Confirmed. To be fixed in the new parser.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=3650&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/3650: unnamed temporary gives: type specifier omitted for parameter
@ 2003-01-02 21:07 neil
0 siblings, 0 replies; 4+ messages in thread
From: neil @ 2003-01-02 21:07 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, mstevens, nobody
Synopsis: unnamed temporary gives: type specifier omitted for parameter
State-Changed-From-To: suspended->closed
State-Changed-By: neil
State-Changed-When: Thu Jan 2 13:07:36 2003
State-Changed-Why:
Fixed in 3.4.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3650
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/3650: unnamed temporary gives: type specifier omitted for parameter
@ 2001-11-05 9:26 lerdsuwa
0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2001-11-05 9:26 UTC (permalink / raw)
To: gcc-bugs, gcc-gnats, gcc-prs, mstevens, nobody
Synopsis: unnamed temporary gives: type specifier omitted for parameter
State-Changed-From-To: open->suspended
State-Changed-By: lerdsuwa
State-Changed-When: Fri Nov 16 09:42:02 2001
State-Changed-Why:
Confirmed. To be fixed in the new parser.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=3650&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* c++/3650: unnamed temporary gives: type specifier omitted for parameter
@ 2001-07-11 8:56 mstevens
0 siblings, 0 replies; 4+ messages in thread
From: mstevens @ 2001-07-11 8:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 3650
>Category: c++
>Synopsis: unnamed temporary gives: type specifier omitted for parameter
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 11 08:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Mark R. Stevens
>Release: /usr/local/gcc-3.0/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
>Organization:
>Environment:
rh linux 7.1
>Description:
Unnamed temporary type not being parsed correctly:
/usr/local/gcc-3.0/bin/g++ -Wall -o test Main.cpp
Main.cpp: In function `int main()':
Main.cpp:49: type specifier omitted for parameter
Main.cpp:50: type specifier omitted for parameter
Main.cpp:42: warning: unused variable `class2 c'
Main.cpp:43: warning: unused variable `class2 d'
Main.cpp:44: warning: unused variable `class2 e'
Main.cpp:45: warning: unused variable `class2 f'
Main.cpp:46: warning: unused variable `class2 g'
>How-To-Repeat:
#include <iostream>
//----------------------------------------------------------------------
class class1 {
public:
explicit class1(double a) {
data = a;
}
double data;
};
//----------------------------------------------------------------------
//----------------------------------------------------------------------
class class2 {
public:
class2(class1 a, float t) {
std::cout << "class2(" << a.data;
std::cout << ", " << t << ")\n";
}
class2(float t, class1 a) {
std::cout << "class2(" << a.data;
std::cout << ", " << t << ")\n";
}
};
//----------------------------------------------------------------------
//----------------------------------------------------------------------
int main() {
double pir = 3.14159;
class1 a(pir);
class1 b(3.14159);
std::cout << "Test 1 ";
std::cout << a.data << ", ";
std::cout << b.data << "\n";
std::cout << "Test 2 ";
float t2 = 1.5;
class2 c(class1(3.14159), t2);
class2 d(a, t2);
class2 e(b, t2);
class2 f(t2, class1(pir));
class2 g(class1((double)pir), t2);
// both should compile ????
class2 h(class1(double(pir)), t2);
class2 i(class1(pir), t2);
return 0;
}
//----------------------------------------------------------------------
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="Main.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Main.cpp"
CiNpbmNsdWRlIDxpb3N0cmVhbT4KCgovLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KY2xhc3MgY2xhc3MxIHsKcHVi
bGljOgogIGV4cGxpY2l0IGNsYXNzMShkb3VibGUgYSkgewogICAgZGF0YSA9IGE7CiAgfQogIGRv
dWJsZSBkYXRhOwp9OwovLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KCi8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpjbGFzcyBjbGFz
czIgewpwdWJsaWM6CiAgY2xhc3MyKGNsYXNzMSBhLCBmbG9hdCB0KSB7CiAgICBzdGQ6OmNvdXQg
PDwgImNsYXNzMigiIDw8IGEuZGF0YTsKICAgIHN0ZDo6Y291dCA8PCAiLCAiIDw8IHQgPDwgIilc
biI7CiAgfQogIGNsYXNzMihmbG9hdCB0LCBjbGFzczEgYSkgewogICAgc3RkOjpjb3V0IDw8ICJj
bGFzczIoIiA8PCBhLmRhdGE7CiAgICBzdGQ6OmNvdXQgPDwgIiwgIiA8PCB0IDw8ICIpXG4iOwog
IH0KfTsKLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tCgovLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KaW50IG1haW4oKSB7CgogIGRv
dWJsZSBwaXIgPSAzLjE0MTU5OwogIGNsYXNzMSBhKHBpcik7CiAgY2xhc3MxIGIoMy4xNDE1OSk7
CgogIHN0ZDo6Y291dCA8PCAiVGVzdCAxICI7CiAgc3RkOjpjb3V0IDw8IGEuZGF0YSA8PCAiLCAi
OwogIHN0ZDo6Y291dCA8PCBiLmRhdGEgPDwgIlxuIjsKCiAgc3RkOjpjb3V0IDw8ICJUZXN0IDIg
IjsKICBmbG9hdCB0MiA9IDEuNTsKICBjbGFzczIgYyhjbGFzczEoMy4xNDE1OSksIHQyKTsKICBj
bGFzczIgZChhLCB0Mik7CiAgY2xhc3MyIGUoYiwgdDIpOwogIGNsYXNzMiBmKHQyLCBjbGFzczEo
cGlyKSk7CiAgY2xhc3MyIGcoY2xhc3MxKChkb3VibGUpcGlyKSwgdDIpOwoKICAvLyBib3RoIHNo
b3VsZCBjb21waWxlID8/Pz8KICBjbGFzczIgaChjbGFzczEoZG91YmxlKHBpcikpLCB0Mik7CiAg
Y2xhc3MyIGkoY2xhc3MxKHBpciksIHQyKTsKCiAgcmV0dXJuIDA7Cn0KLy8tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
Cg==
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-02 21:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05 11:26 c++/3650: unnamed temporary gives: type specifier omitted for parameter lerdsuwa
-- strict thread matches above, loose matches on Subject: below --
2003-01-02 21:07 neil
2001-11-05 9:26 lerdsuwa
2001-07-11 8:56 mstevens
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).