-fstrict-aliasing/-fomit-frame-pointer and ostringstream-constructor

Phil Edwards pedwards@jaj.com
Sat Apr 1 00:00:00 GMT 2000


Felix Natter <fnatter@gmx.net>:
>
> hi,
> (libstdc++-2.90.7 with gcc-2.95.2)
> (bug-reporting via sourceware.cygnus.com/libstdc++/ -> bug-reports does
> not
> work: I am redirected to the same page over and over)

It's recently become a known bug; we're working on it...


> using -fomit-frame-pointer the stack-frame seems to get "corrupted":
> "main" does not appear in the backtrace.
[snip]
> then I looked up "-O" in "info gcc"
>      When you specify `-O', the compiler turns on `-fthread-jumps' and
>      `-fdefer-pop' on all machines.  The compiler turns on
>      `-fdelayed-branch' on machines that have delay slots, and
>      `-fomit-frame-pointer' on machines that can support debugging even
>      without a frame pointer.  On some machines the compiler also turns
>      on other flags.

I cannot speak for the compiler, but that same manual page also says

#  -fomit-frame-pointer 
#       Don't keep the frame pointer in a register for functions
#       that don't need one.  This avoids the instructions to
#       save, set up and restore frame pointers; it also makes
#       an extra register available in many functions.  *It also
#       makes debugging impossible on some machines.*

Nowhere in your message did you say what platform/OS you're using.
If you're on such a machine as mentioned in the -fomit-frame-pointer
description, that could explain why debugging is doing weird things
to you.  (I don't say that is /the/ reason; I'm simply offering one
possibility in the lack of other information.)

As far as the ostringstream ctor goes, there have been a lot of bugfixes
to stringstreams since the last snapshot.  You might try one of the
pre-snapshot-snapshots currently in the ftp area, or wait until the
2.90.8 snapshot is released and try again.


Phil



More information about the Libstdc++ mailing list