From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28730 invoked by alias); 19 Sep 2008 22:38:52 -0000 Received: (qmail 28433 invoked by uid 48); 19 Sep 2008 22:37:30 -0000 Date: Fri, 19 Sep 2008 22:38:00 -0000 Subject: [Bug c++/37594] New: Assembler reports wrong symbol already defined X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "chris+gcc at qwirx dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-09/txt/msg02298.txt.bz2 Using this test code: // #define _FILE_OFFSET_BITS 64 // #include // #include // 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