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)

Reply via email to