Article View: gnu.g++.bug
Article #153g++ bug
From: R. Alberto Villarica
Date: Thu, 23 Jul 1992 19:18
Date: Thu, 23 Jul 1992 19:18
18 lines
846 bytes
846 bytes
The following program doesn't compile with g++2.2.2.
~Al
----------------
main() {
const char* x = "world";
x = (x == 0) ? "hello" : x;
printf(x);
}
---------------------
Here's the output:
g++ test.cc <CR>
test.cc: In function `int main ()':
test.cc:4: assignment between incompatible pointer types
test.cc:5: warning: implicit declaration of function `printf'
Technical Details
Message-ID:
<RVILLARI.92Jul23151829@lynx.cat.syr.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cat.syr.edu!rvillariShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cat.syr.edu!rvillari From: rvillari@cat.syr.edu (R. Alberto Villarica) Subject: g++ bug Message-ID: <RVILLARI.92Jul23151829@lynx.cat.syr.EDU> Sender: gnulists@ai.mit.edu Organization: Syracuse University Distribution: gnu Date: Thu, 23 Jul 1992 19:18:29 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 21