public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37594]  New: Assembler reports wrong symbol already defined
@ 2008-09-19 22:38 chris+gcc at qwirx dot com
  2008-09-19 22:44 ` [Bug c++/37594] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: chris+gcc at qwirx dot com @ 2008-09-19 22:38 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/37594] Assembler reports wrong symbol already defined
  2008-09-19 22:38 [Bug c++/37594] New: Assembler reports wrong symbol already defined chris+gcc at qwirx dot com
@ 2008-09-19 22:44 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-19 22:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-09-19 22:42 -------
open64 in this case is defined twice in the assembly.
You said that open is open64 via:
extern "C" int open (__const char *__file, int __oflag, ...) __asm__
("open64");


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37594


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-19 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-19 22:38 [Bug c++/37594] New: Assembler reports wrong symbol already defined chris+gcc at qwirx dot com
2008-09-19 22:44 ` [Bug c++/37594] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).