Message-ID: <37039DAC.9F3435FD@ox.ios.ac.cn> Date: Fri, 02 Apr 1999 00:24:12 +0800 From: Yang X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: try, throw, and catch References: <370121EB DOT 33506B4E AT jps DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com One way to avoid this problem is using reference. catch ( sorry& stuff ) btw, How to join the newsgroup of djgpp, where I can find the newsgroup server for it? Dennis Yelle wrote: > > When I compile this program: > > ---------- cut here for bug.cpp ------------------- > #include > #include > > struct sorry{ > const char *error_msg; > sorry( const char *p) : error_msg(p) {} > }; > > int main() > { > try { > throw sorry( "test 3"); > } > catch ( sorry stuff ) { > cerr << "Sorry, "; > cerr << stuff.error_msg ; > cerr << '\n'; > } > cout << '\n'; > } > ---------- cut here for bug.cpp ------------------- > > with gxx version 2.8.1 > using this: > gxx -g -Wall bug.cpp -o bug.exe > I get this: > bug.cpp: In function `int main()': > bug.cpp:14: warning: value computed is not used > > Can someone tell me which value is not used? > > Dennis Yelle