This is the mail archive of the 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]

c++/9847: g++-3.4 ice on :?-operator with double class definition in expand_expr

>Number:         9847
>Category:       c++
>Synopsis:       g++-3.4 ice on :?-operator with double class definition in  expand_expr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 25 12:46:00 UTC 2003
>Originator:     Rasmus Hahn
>Release:        unknown-1.0
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-threads --enable-languages=c,c++,objc : (reconfigured)  : (reconfigured) 
Thread model: posix
gcc version 3.4 20030225 (experimental)
Internal compiler error after redifinition of class (QString in this case) and when compiling
:?-conditional expression. I suspect this is a variant of PR9440, but i do not know for
sure and perhaps this might help to correct any of these. Of course the How-To-Repeat program is not legal C-Code. The ICE does not show if the conditional depends not on
Variable 'x' but on constant value, for example '1'.
This bug is in my Version 3.4 but not in my Version 3.3-20021206 as the case for PR9440.

$ g++ cc warning: `class QString' only defines private 
   constructors and has no friends error: redefinition of `class QString' error: previous definition of `class QString' In function `const QString q()': internal compiler error: in expand_expr, at expr.c
Please submit a full bug report,...
class QString
  QString (const QString & a);

class QString { };

const QString q () {
  QString z;
  int x;
  /* no error if next 'x' is constant */
  return x ? QString () : QString ();


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