[PATCH] Bad default return C++ return on VAX. (Was: real.c patch comments?)
Matt Thomas
matt@3am-software.com
Sun Jun 23 12:22:00 GMT 2002
At 10:39 AM 6/23/2002, John David Anglin wrote:
> > > I'm going to run these tests today. I've completed the before tests.
> >
> > It does seem to improve things. (look at gcc-testresults to see
> > the two runs). Though it's hard to tell with g++ because cc1plus
> > is emitting this for main routines that don't have a return value:
> >
> > movl $1,%r0
> > ret
> >
> > which causes a non-zero status to be returned. i386 and powerpc
> > return a 0. Any idea why VAX gets a 1 instead of 0? [1 would be
> > success under VMS but I hope that isn't the reason why.]
>
>No. This doesn't happen with 3.0.
>
>I had a bootstrap failure in stage2 in my most recent build compiling
>real.c. The preprocessor incorrectly processed the file resulting in
>NANS being defined. DEC is 1, so this shouldn't have happened. I was
>testing a couple of patches so I decided to redo the bootstrap. I would
>suspect that there are still problems with casesi but it could be
>something else.
It might be something else since casesi has been working fine for me.
>The was a patch affecting returns on 2001-08-09.
>
>Can you dump the rtl with "-da"? This might provide some clues.
Found it. See the attached patch. Note that all VAX platforms have
VMS_TARGET defined (either 0 or 1). If VMS_TARGET is not defined, the
else part will be used.
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: decl.c.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020623/6eb32049/attachment.txt>
More information about the Gcc-patches
mailing list