[Bug pch/40272] error using precompiled headers with extra debug info (-g3)
noloader at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Dec 5 14:02:00 GMT 2010
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)
More information about the Gcc-bugs
mailing list