public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14079] New: wrong debug info for extern boolean variable in debug mode
@ 2004-02-09 10:01 gcc-bugzilla at gcc dot gnu dot org
  2004-02-09 10:54 ` [Bug c++/14079] " konstantin at mysql dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-02-09 10:01 UTC (permalink / raw)
  To: gcc-bugs

      Compile a program attached in how-to-repeat section with
      c++ -g -ggdb foo.cc

      Run it in gdb. Exec:
      b main
      p sizeof(bool)
      p sizeof(foo)
      p sizeof(bar)
      p &foo
      p &bar
      set foo=1
      set bar=0
      set foo=1

      Note, that nevertheless pritnf() output is correct.

Environment:
System: Linux oak 2.4.21-99-athlon #1 Wed Sep 24 13:34:32 UTC 2003 i686 athlon i386 GNU/Linux
Architecture: i686

OS: SuSE Linux 9.0, GNU gdb 5.3.92 from default package. Note, that the bug
reproduces on the other developers SuSE 9.0 boxes, having earlier versions of
GCC.

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.3.2/configure --enable-threads=posix --enable-languages=c,c++

How-To-Repeat:
     -- cut (foo.cc) 
#include <stdio.h>
extern bool foo;
bool foo, bar;

int main()
{
  printf("%d, %d, %d\n", sizeof(bool), sizeof(foo), sizeof(bar));
}
     -- end cut
------- Additional Comments From konstantin at mysql dot com  2004-02-09 10:01 -------
Fix:
    Work around is not use bool if bool is extern, because they are not
    operable in debug mode.

-- 
           Summary: wrong debug info for extern boolean variable in debug
                    mode
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: konstantin at mysql dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14079


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-03-17 22:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-09 10:01 [Bug c++/14079] New: wrong debug info for extern boolean variable in debug mode gcc-bugzilla at gcc dot gnu dot org
2004-02-09 10:54 ` [Bug c++/14079] " konstantin at mysql dot com
2004-02-14 20:40 ` [Bug debug/14079] " pinskia at gcc dot gnu dot org
2004-02-15  0:25 ` [Bug debug/14079] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-02  2:31 ` mmitchel at gcc dot gnu dot org
2004-03-05 18:20 ` austern at apple dot com
2004-03-07  2:01 ` pinskia at gcc dot gnu dot org
2004-03-08 19:03 ` cvs-commit at gcc dot gnu dot org
2004-03-08 19:30 ` cvs-commit at gcc dot gnu dot org
2004-03-08 20:15 ` [Bug debug/14079] [3.3 " pinskia at gcc dot gnu dot org
2004-03-17 21:52 ` cvs-commit at gcc dot gnu dot org
2004-03-17 22:08 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).