### How to create bug situation. vi@vi:~/code/test$ ls q.c stable.h w.c vi@vi:~/code/test$ cat stable.h namespace { int qwerty; } vi@vi:~/code/test$ cat q.c #include "stable.h" int main(){return 0;} vi@vi:~/code/test$ cat w.c #include "stable.h" ### Try to compile them vi@vi:~/code/test$ g++ -c q.c && g++ -c w.c && g++ q.o w.o vi@vi:~/code/test$ # Everything is allright. ### Now try to use precompiled headers vi@vi:~/code/test$ g++ -x c++-header stable.h vi@vi:~/code/test$ g++ -c q.c && g++ -c w.c && g++ q.o w.o w.o:(.bss+0x0): multiple definition of `(anonymous namespace)::qwerty' q.o:(.bss+0x0): first defined here collect2: ld returned 1 exit status vi@vi:~/code/test$ # It changes behavior! ### Verbose vi@vi:~/code/test$ g++ --version g++ (GCC) 4.1.1 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. vi@vi:~/code/test$ g++ -x c++-header -v stable.h 2>&1 | less Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.1.1/configure --with-languages=c,c++,java Thread model: posix gcc version 4.1.1 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1plus -quiet -v -D_GNU_SOURCE stable.h -quiet -dumpbase stable.h -mtune=pentiumpro -auxbase stable -version -o /tmp/ccJclyGu.s --output-pch=stable.h.gch ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../.. /../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/qt/include /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1 /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/i686-p c-linux-gnu /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/backwa rd /usr/local/include /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/include /usr/include End of search list. GNU C++ version 4.1.1 (i686-pc-linux-gnu) compiled by GNU C version 4.1.1. GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15796 Compiler executable checksum: 0df7441bd54adeeb14f3ed5c0d3ee62c g++ q.c w.c -v 2>&1 | less Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.1.1/configure --with-languages=c,c++,java Thread model: posix gcc version 4.1.1 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1plus -quiet -v -D_GNU_SOURCE q.c -quiet -dumpbase q.c -mtune=pentiumpro -auxbase q -version -o /tmp/cc5SON1S. s ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../.. /../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/qt/include /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1 /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/i686-p c-linux-gnu /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/backwa rd /usr/local/include /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/include /usr/include End of search list. GNU C++ version 4.1.1 (i686-pc-linux-gnu) compiled by GNU C version 4.1.1. GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15796 Compiler executable checksum: 0df7441bd54adeeb14f3ed5c0d3ee62c /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccwwqFsN.o /tmp/cc5SON1S.s GNU assembler version 2.17 (i686-pc-linux-gnu) using BFD version 2.17 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.1.1/cc1plus -quiet -v -D_GNU_SOURCE w.c -quiet -dumpbase w.c -mtune=pentiumpro -auxbase w -version -o /tmp/cc5SON1S. s ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../.. /../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/qt/include /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1 /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/i686-p c-linux-gnu /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../include/c++/4.1.1/backwa rd /usr/local/include /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/include /usr/include End of search list. GNU C++ version 4.1.1 (i686-pc-linux-gnu) compiled by GNU C version 4.1.1. GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15796 Compiler executable checksum: 0df7441bd54adeeb14f3ed5c0d3ee62c /usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccO6zFNO.o /tmp/cc5SON1S.s GNU assembler version 2.17 (i686-pc-linux-gnu) using BFD version 2.17 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.1.1/collect2 --eh-frame-hdr -m elf_i 386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/loca l/lib/gcc/i686-pc-linux-gnu/4.1.1/crtbegin.o -L/usr/local/lib/gcc/i686-pc-linux- gnu/4.1.1 -L/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux -gnu/lib -L/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.1/../../.. /tmp/ccwwqFsN.o / tmp/ccO6zFNO.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/lib/gcc/i 686-pc-linux-gnu/4.1.1/crtend.o /usr/lib/crtn.o /tmp/ccO6zFNO.o:(.bss+0x0): multiple definition of `(anonymous namespace)::qwert y' /tmp/ccwwqFsN.o:(.bss+0x0): first defined here collect2: ld returned 1 exit status ### Such structures are in use in boost/lambda/core.hpp header, and multi-unit project ceases to link if precompiled headers are enabled (otherwise it works).
This is a dup of bug 10591 which will be fixed with the release of 4.2.0. *** This bug has been marked as a duplicate of 10591 ***
#0 compute_frame_id (fi=0x10007c50040) at /home/simark/src/wt/good/gdb/frame.c:549 #1 0x000001000324ddd8 http://the-hunters.org/category/services/ in get_prev_frame_if_no_cycle (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:1927 http://www-look-4.com/health/covid-and-tech/ #2 0x000001000324f9f8 in get_prev_frame_always_1 (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:2108 https://komiya-dental.com/property/google-android/ #3 0x000001000324fa38 in get_prev_frame_always (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:2124 http://www.iu-bloomington.com/shopping/hatchback-cars/ #4 0x00000100032511fc in get_prev_frame (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:2376 https://waytowhatsnext.com/sports/asian-sports/ #5 0x00000100042972c0 in backtrace_command_1 (fp_opts=..., bt_opts=..., http://www.wearelondonmade.com/technology/van-technology/ count_exp=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/stack.c:2055 #6 0x0000010004297918 in backtrace_command (arg=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/stack.c:2183 http://www.jopspeech.com/travel/windows-11/ #7 0x0000010002a4a538 in do_const_cfunc (c=0x10007c93390, args=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/cli/cli-decode.c:107 http://joerg.li/health/covid-and-tech/ #8 0x0000010002a56ea4 in cmd_func (cmd=0x10007c93390, args=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/cli/cli-decode.c:1952 http://connstr.net/services/mobile-games/ #9 0x00000100045e32e4 in execute_command (p=0x10007ab9c52 "", from_tty=1) at /home/simark/src/wt/good/gdb/top.c:653 http://embermanchester.uk/services/whatsapp-number-change/ #10 0x00000100031b21c0 in command_handler (command=0x10007ab9c50 "bt") at /home/simark/src/wt/good/gdb/event-top.c:587 http://www.slipstone.co.uk/property/hp-of-cars/ #11 0x00000100031b2d4c in command_line_handler (rl=...) at /home/simark/src/wt/good/gdb/event-top.c:772 http://www.logoarts.co.uk/travel/london/ #12 0x00000100031b06e4 in gdb_rl_callback_handler (rl=0x10007cc5e30 "bt") at /home/simark/src/wt/good/gdb/event-top.c:218 http://fishingnewsletters.co.uk/category/crypto/ #13 0x0000010004ae6410 in rl_callback_read_char () at http://www.acpirateradio.co.uk/health/transportation-security/ /home/simark/src/wt/good/readline/readline/callback.c:281 #14 0x00000100031b02b0 in gdb_rl_callback_read_char_wrapper_noexcept () at http://www.go-mk-websites.co.uk/category/crypto/ /home/simark/src/wt/good/gdb/event-top.c:176 http://www.compilatori.com/technology/download-videos/ #15 0x00000100031b03d4 in gdb_rl_callback_read_char_wrapper (client_data=0x10007ab99c0) at /home/simark/src/wt/good/gdb/event-top.c:193 http://www.mconstantine.co.uk/category/crypto/ #16 0x00000100031b1a4c in stdin_event_handler (error=0, client_data=0x10007ab99c0) at /home/simark/src/wt/good/gdb/event-top.c:515 https://www.webb-dev.co.uk/services/navona-trains/ #17 0x00000100031aa778 in handle_file_event (file_ptr=0x10007d6aa20, ready_mask=1) at /home/simark/src/wt/good/gdb/event-loop.c:731 #18 0x00000100031ab3e0 in gdb_wait_for_event (block=1) at