This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13736] [3.4/3.5 Regression] Parser confused on compound casts
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2004 12:19:28 -0000
- Subject: [Bug c++/13736] [3.4/3.5 Regression] Parser confused on compound casts
- References: <20040119091055.13736.jan@etpmod.phys.tue.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-01-19 12:19 -------
Confirmed, a regression on 3.4/3.5 probably caused by the new parser. A self-
contained testcase is obviously:
-------------------------------------------------
struct string
{
string() {};
string(const string& ) {};
string(const char * ) {};
};
int main()
{
string s1(string( (string )(""))); // OK
string s2(string( (const char*)(""))); // Does not compile
typedef const char* charp;
string s3(string( (charp)(""))); // Workaround: intermediate typedef
string s4((string( (const char*)("")))); // Workaround: extra parenthesis
return 0;
}
-------------------------------------------------
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2004-01-19 12:19:25
date| |
Summary|[gcc-3.4 parser regression] |[3.4/3.5 Regression] Parser
|Some compound casts rejected|confused on compound casts
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13736