Re: [C++] Omitted return statement

From: Gary Labowitz (glabowitz_at_comcast.net)
Date: 04/30/04


Date: Thu, 29 Apr 2004 21:55:12 -0400


"Chris ( Val )" <chrisval@bigpond.com.au> wrote in message
news:c6r24j$f1nom$1@ID-110726.news.uni-berlin.de...
>
> "Gary Labowitz" <glabowitz@comcast.net> wrote in message
> news:vdKdnQjoJZWQmAzdRVn-tA@comcast.com...
> | "Chris ( Val )" <chrisval@bigpond.com.au> wrote in message
> | news:c6qub1$d8srh$1@ID-110726.news.uni-berlin.de...
> | >
> | > "Gary Labowitz" <glabowitz@comcast.net> wrote in message
> | > news:TMmdndSuCcd7aw3dRVn-gQ@comcast.com...
> | > A couple of points for a faulty compiler ?
> | > Boy, you're a tough marker ;-).
> |
> | The compiler didn't leave out the return statement, he did. And,
yes,
> | I am a tough marker.
>
> I never said the compiler did - How could it :-).
>
> Well, since you didn't answer my question about the
> switches, I decided to try your code under GCC 3.3
> on my other box. I recently installed "Windows Services
> for UNIX"(free ~250 MB download from Microsoft), and I
> used the 'C' Shell to compile your sample code.
>
> There were indeed warnings produced when switches
> were used, and none when the switches were left
> out. I therefore conclude, you did not use any :-).

Sorry, Val, I missed that. However, compiling with both -pedantic
and -pedantic-errors produces no warnings or errors. The compiler just
doesn't care if the return is left out.

-- 
Gary


Relevant Pages

  • Re: Win32 API and gfortran
    ... write out a module containing only interface blocks and compile the ... that the /iface switches and ATTRIBUTES directives change the compiler ... arguments are passed in the normal Fortran way ...
    (comp.lang.fortran)
  • Re: Trig Function Linking Problems
    ... There are switches to see how the c compiler is called ... compiler stages, assembler or dynmic linking is probably a good first ...
    (comp.lang.ada)
  • Re: Borland e i "nuovi" MacIntel ... x Sviluppatori ... "informati" ... :-)
    ... > A me un linguaggio che cambia radicalmente semantica a seconda di uno ... helen:~ alex$ python -c'print 2/3' ... ad esempio) e` sacrosanto introdurre compiler switches per ...
    (it.comp.macintosh)
  • (part 11) Han from China answers your C questions
    ... I really wish gcc switches were as carefully planned out as the rest ... figured out what the precise differences are between those two switches. ... sizeof's result is evaluated by the compiler. ... I, for one, am proud of how Richard is coming along. ...
    (comp.lang.c)
  • Re: Switch Optimization
    ... Peter van Merkerk wrote: ... The compiler will convert ... >>a most switches into an ifelse sequence anyway. ... C++ Faq: http://www.parashift.com/c++-faq-lite ...
    (comp.lang.cpp)