home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!bonnie.concordia.ca!daily-planet.concordia.ca!patrice
- From: patrice@cs.concordia.ca (SCATTOLIN patrice)
- Newsgroups: comp.lang.c++
- Subject: BC++ 3.1 BUG: getting an UNREACHABLE CODE WARNING!
- Message-ID: <4876@daily-planet.concordia.ca>
- Date: 5 Sep 92 20:27:57 GMT
- Sender: usenet@daily-planet.concordia.ca
- Organization: Computer Science, Concordia University, Montreal, Quebec
- Lines: 47
-
-
- I am using BC++ 3.1 and I get compilation warnings:
- one of which is:
-
-
- WARNING: UNREACHABLE CODE in the following code at the next to last line:
-
-
- tek_complex newcomplex(1,1);
- SIGNALRANGE i;
- cout <<"GAZOU\n";
- getch();
-
-
-
- However the program exeutes the statement that it claims is unreachable
- "cout<<"GAZOU\n"
-
-
-
- The warning will disapear when I comment the following code:
-
-
- friend ostream& operator<<(ostream& os, signal_buffer<sig>& a)
- {
- SIGNALRANGE i;
- for (i=a.strt;i<a.end;i++)
- os << a.dv[i];
- return os;
- }
-
-
- This piece of code belongs to a templace declaring signal_buffer in a .h.
- If anyone can provide an answer please tell me. It's an annoying
- warning because it's wrong and you chase it down and can't do
- anything about it!.
-
- Thanks
-
-
-
-
- --
- Patrice Scattolin
- patrice@cs.concordia.ca
- Concordia University Montreal, Canada
- "I am so far north that Santa lives two blocks from me"
-