Don't know if this is a bug or not ...

Doug Semler doug@seaspace.com
Tue Aug 10 21:15:00 GMT 1999


----- Original Message -----
From: Bogus User <bogus_user@hotmail.com>
To: <gcc@gcc.gnu.org>
Sent: Tuesday, August 10, 1999 8:08 PM
Subject: Don't know if this is a bug or not ...


> When I try to compile the following code
>
> class exc{
> public:
>   exc(){ }
> };
>
> void main(){
>   (1<2)?0:throw exc();
> }
>
>
> I get the error
> "converting to `void' from `int'"
>
> I've tried with egcs and gcc-2.95 and they both give the error.  Should
this
> be an error?

<plonk!>

Read a C++ book and find out about main() and its return value.

---
Doug Semler                       | qbht@frnfcnpr.pbz
Least Senior Software Developer   | Garbage In -- Gospel Out
Low Man on the Totem Pole         | Bus Error (passengers dumped)
Minister of Obnoxious Signatures  | BAAWA, Long live her majesty IPU
Holder of Past Knowledge          | AA # lost in move to real job
Pioneer Preference Status O-      | <plonk!>

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/M d---(pu) s++:- a-- C++ UILSH+++$ P--- L++ E--- W+
N++ o-- K? w--(++$) O- M-- V- PS+ !PE Y PGP t(+) 5+++ X+
R- tv+(-) b+(++) DI++++ D G e++>++++ h!>--- r% y+>+++++**
------END GEEK CODE BLOCK------





More information about the Gcc mailing list