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]

egcs-19990228 const ignorance bug



I think constness is violated in the code below. In any case, declarations
like this seem to cause ICE's in more complicated code.

///// Begin error.cpp /////
int main() {
  char **text;
  *text="Hi";  // Should be an error IMHO.
  (*text)[1]='o';
}
///// End error.cpp /////

with egcs-2.93.10 on alphaev56-dec-osf4.0d:

> c++ -Wall --ansi --pedantic error.cpp -o error
> ./error
Segmentation fault
>

Regards
/Oskar




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