The error occurs while processing [lab.o].
I'm also getting this. Maybe it's GCC4 being picky.
This being:
make[1]: Entering directory `/home/ni1s/src/fs2_open/fs2_open/code'
if g++ -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.6.7\" -DPACKAGE_STRING=\"fs2_open\ 3.6.7\" -DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBGL=1 -DSCP_UNIX=1 -DNO_DIRECT3D=1 -DUSE_OPENAL=1 -I. -I. -g -O2 -Wall -I/usr/include/SDL -D_REENTRANT -fsigned-char -Wno-unknown-pragmas -Wno-deprecated -Wno-char-subscripts -I../lua -MT lab.o -MD -MP -MF ".deps/lab.Tpo" -c -o lab.o `test -f 'lab/lab.cpp' || echo './'`lab/lab.cpp; \
then mv -f ".deps/lab.Tpo" ".deps/lab.Po"; else rm -f ".deps/lab.Tpo"; exit 1; fi
./math/floating.h: In function "int fl_round_2048(float)":
./math/floating.h:132: warning: dereferencing type-punned pointer will break strict-aliasing rules
lab/wmcgui.h: At global scope:
lab/wmcgui.h:535: error: extra qualification "TreeItem::" on member "ClearAllItems"
lab/wmcgui.h:630: error: extra qualification "Text::" on member "SetSaveLoc"
lab/lab.cpp: In function "void show_ship(float)":
lab/lab.cpp:864: warning: missing braces around initializer for "vec3d::<anonymous union>"
lab/lab.cpp:864: warning: missing braces around initializer for "vec3d::<anonymous union>::<anonymous struct>"
lab/lab.cpp:864: warning: missing braces around initializer for "vec3d::<anonymous union>"
lab/lab.cpp:864: warning: missing braces around initializer for "vec3d::<anonymous union>::<anonymous struct>"
lab/lab.cpp:864: warning: missing braces around initializer for "vec3d::<anonymous union>"
lab/lab.cpp:864: warning: missing braces around initializer for "vec3d::<anonymous union>::<anonymous struct>"
make[1]: *** [lab.o] Error 1
make[1]: Leaving directory `/home/ni1s/src/fs2_open/fs2_open/code'
make: *** [all-recursive] Error 1