This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pch/40272] error using precompiled headers with extra debug info (-g3)
- From: "noloader at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 5 Dec 2010 14:02:12 +0000
- Subject: [Bug pch/40272] error using precompiled headers with extra debug info (-g3)
- Auto-submitted: auto-generated
- References: <bug-40272-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40272
Jeffrey Walton <noloader at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |noloader at gmail dot com
--- Comment #5 from Jeffrey Walton <noloader at gmail dot com> 2010-12-05 14:01:38 UTC ---
Confirmed.
Bad:
CXXFLAGS = -g3 -ggdb -DDEBUG -O0 -Wall -Wextra -Wno-unused-parameter -I.
Good:
CXXFLAGS = -g2 -ggdb -DDEBUG -O0 -Wall -Wextra -Wno-unused-parameter -I.
Other buggy behavior: use a precompiled header. Add empty class files and
include the the precompiled header. GCC crash.
$ cat class-test.h
#include "pch.h"
$ cat class-test.cpp
$ cat makefile
CXX = g++
CXXFLAGS = -g3 -ggdb -DDEBUG -O0 -Wall -Wextra -Wno-unused-parameter -I.
# CXXFLAGS = -g1 -DNDEBUG -O2 -Wall -Wextra -Wno-unused-parameter -I.
COMMONSRCS = class-test.cpp
EXESRCS = $(COMMONSRCS)
EXEOBJS = $(EXESRCS:.cpp=.o)
LDFLAGS = -lcrypto -lpthread
default: precompile all
all: test.exe
precompile:
$(CXX) $(CXXFLAGS) pch.h -o pch.h.gch
test.exe:
$(CXX) $(CXXFLAGS) $(EXESRCS) -o $@ $(LDFLAGS)