[Bug c++/37594] New: Assembler reports wrong symbol already defined
chris+gcc at qwirx dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 19 22:38:00 GMT 2008
Using this test code:
// #define _FILE_OFFSET_BITS 64
// #include <fcntl.h>
// #include <features.h>
// extern "C" int __REDIRECT (open, (__const char *__file, int __oflag, ...),
open64)
// __nonnull ((1));
extern "C" int open (__const char *__file, int __oflag, ...) __asm__
("open64");
extern "C" int
open(const char *path, int flags, ...)
{
return 0;
}
extern "C" int
open64 (__const char *path, int flags, ...)
{
return 0;
}
gcc reports the following error:
g++ -g -g -Wall -Wundef -I../../lib/win32 -I../../lib/common
-DBOX_VERSION="\"trunk_2278M\"" -DBOX_MODULE="\"lib/intercept\"" -c
intercept.cpp -o ../../debug/lib/intercept/intercept.o
/tmp/ccSJqEux.s: Assembler messages:
/tmp/ccSJqEux.s:32: Error: symbol `open64' is already defined
However, open64() is not already defined. If anything, open() is already
defined, by both a redirect and a definition. Commenting out either allows the
code to compile.
--
Summary: Assembler reports wrong symbol already defined
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chris+gcc at qwirx dot com
GCC build triplet: i386-linux-gnu
GCC host triplet: i386-linux-gnu
GCC target triplet: i386-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37594
More information about the Gcc-bugs
mailing list