This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13736] [3.4/3.5 Regression] Parser confused on compound casts


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]