This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
GCC 3.4 issue
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos development <ecos-devel at ecos dot sourceware dot org>
- Date: Fri, 27 Feb 2004 08:37:46 -0700
- Subject: GCC 3.4 issue
- Organization: MLB Associates
Just for grins, I thought I'd give 3.4 (pre-release) a spin. Lo and behold,
there are problems (PPC at least):
powerpc-eabi-gcc -c -I/work/moab/t/install/include -I/work2/ecos/packages/io/fileio/current -I/work2/ecos/packages/io/fileio/current/src -I/work2/ecos/packages/io/fileio/current/tests -I. -I/work2/ecos/packages/io/fileio/current/src/ -msoft-float -mcpu=405 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -Wp,-MD,src/file.tmp -o src/io_fileio_file.o /work2/ecos/packages/io/fileio/current/src/file.cxx
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
/tmp/cchuPi8h.s: Assembler messages:
/tmp/cchuPi8h.s:105: Error: symbol `__cygvar_discard_me__' is already defined
This comes from use of this macro:
// -------------------------------------------------------------------------
// Reference a symbol without explicitly making use of it. Ensures that
// the object containing the symbol will be included when linking.
#define CYG_REFERENCE_OBJECT(__object__) \
CYG_MACRO_START \
static void *__cygvar_discard_me__ __attribute__ ((unused)) = \
&(__object__); \
CYG_MACRO_END
At least with previous versions of GCC, this worked out OK.
Any ideas how best to work around it (or maybe this should be
reported as a GCC bug)?
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates