public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17082] New: Erroneous error message when using arrays in double constructor
@ 2004-08-18 12:59 claus dot tondering at teknologisk dot dk
2004-08-18 13:03 ` [Bug c++/17082] " claus dot tondering at teknologisk dot dk
2004-08-18 13:10 ` bangerth at dealii dot org
0 siblings, 2 replies; 3+ messages in thread
From: claus dot tondering at teknologisk dot dk @ 2004-08-18 12:59 UTC (permalink / raw)
To: gcc-bugs
The following code cannot be compiled with g++.
g++ prints this error message for the the declartion of s1:
error: syntax error before `,' token
Switching the arguments arr[0] and 3 causes the error message to go away.
Error seen on a Cygwin system running g++ version 3.3.1 and on a GNU/Linux
system running g++ version 3.2.2.
-----------------------------------------------------------
class A {
public:
A(int i, int j);
};
class B {
public:
B(A n);
};
int arr[10];
void func()
{
B s1( A(arr[0], 3) );
}
--
Summary: Erroneous error message when using arrays in double
constructor
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: claus dot tondering at teknologisk dot dk
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17082
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/17082] Erroneous error message when using arrays in double constructor
2004-08-18 12:59 [Bug c++/17082] New: Erroneous error message when using arrays in double constructor claus dot tondering at teknologisk dot dk
@ 2004-08-18 13:03 ` claus dot tondering at teknologisk dot dk
2004-08-18 13:10 ` bangerth at dealii dot org
1 sibling, 0 replies; 3+ messages in thread
From: claus dot tondering at teknologisk dot dk @ 2004-08-18 13:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From claus dot tondering at teknologisk dot dk 2004-08-18 13:03 -------
Replacing arr[0] with a simple int variable or constant also causes the error
to go away.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17082
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/17082] Erroneous error message when using arrays in double constructor
2004-08-18 12:59 [Bug c++/17082] New: Erroneous error message when using arrays in double constructor claus dot tondering at teknologisk dot dk
2004-08-18 13:03 ` [Bug c++/17082] " claus dot tondering at teknologisk dot dk
@ 2004-08-18 13:10 ` bangerth at dealii dot org
1 sibling, 0 replies; 3+ messages in thread
From: bangerth at dealii dot org @ 2004-08-18 13:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-08-18 13:10 -------
This is fixed in gcc 3.4 and higher. It is also one of the cases listed
in the frequently reported bug section of our webpage (and I believe
the manual) and is probably also listed in the release notes for 3.4.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17082
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-18 13:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-18 12:59 [Bug c++/17082] New: Erroneous error message when using arrays in double constructor claus dot tondering at teknologisk dot dk
2004-08-18 13:03 ` [Bug c++/17082] " claus dot tondering at teknologisk dot dk
2004-08-18 13:10 ` bangerth at dealii 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).