public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14962] New: g++ appears to ignore #pragma redirect_extname
@ 2004-04-15  9:30 phil at fsel dot com
  2004-04-15  9:41 ` [Bug c++/14962] " phil at fsel dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: phil at fsel dot com @ 2004-04-15  9:30 UTC (permalink / raw)
  To: gcc-bugs

g++-3.3.3 seems to be ignoring #pragma redirect_extname

Attached to this bug are two preprocessor output files & the original source
which they were created from. The .i has been created with

  gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -E

while the .ii has been created with

  g++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -E

I've then edited both files to comment out the definitions of statvfs and
fstatvfs. This should make no difference to the compilation, since these names
have been redifined by the pragma immediately preceeding them to statvfs64 and
fstatvfs64 (due to the -D options I added to the compiler flags)

When I compile the .i with gcc, it works fine -- I get a binary which contains a
weak symbol for statvfs64() as expected. When I compile with g++ I get an error
about undefined statvfs. If I don't comment out the definition of statvfs and
compile the .ii with g++, then I get a weak symbol for statvfs() instead of the
expected statvfs64()

Given that defining -D_FILE_OFFSET_BITS=64 has resulted in off_t being defined
to be 64 bits, linking the binary against statvfs() instead of statvfs64()
results in junk being placed in the ouput.

-- 
           Summary: g++ appears to ignore #pragma redirect_extname
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: phil at fsel dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


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


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

end of thread, other threads:[~2004-05-12 15:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-15  9:30 [Bug c++/14962] New: g++ appears to ignore #pragma redirect_extname phil at fsel dot com
2004-04-15  9:41 ` [Bug c++/14962] " phil at fsel dot com
2004-04-15  9:45 ` phil at fsel dot com
2004-04-15  9:55 ` phil at fsel dot com
2004-04-15 11:05 ` phil at fsel dot com
2004-04-15 11:55 ` phil at fsel dot com
2004-04-15 12:12 ` ebotcazou at gcc dot gnu dot org
2004-04-15 13:47 ` phil at fsel dot com
2004-04-20 12:48 ` [Bug c++/14962] g++ ignores " ebotcazou at gcc dot gnu dot org
2004-04-20 13:05 ` phil at fsel dot com
2004-04-20 13:35 ` ebotcazou at gcc dot gnu dot org
2004-04-20 13:48 ` phil at fsel dot com
2004-04-20 13:50 ` [Bug c++/14962] [3.3/3.4 regression] g++ ignores #pragma redefine_extname ebotcazou at gcc dot gnu dot org
2004-04-20 15:10 ` phil at fsel dot com
2004-04-20 16:25 ` phil at fsel dot com
2004-05-04  8:06 ` [Bug c++/14962] [3.3/3.4/3.5 " ebotcazou at gcc dot gnu dot org
2004-05-04 12:14 ` ebotcazou at gcc dot gnu dot org
2004-05-04 14:06 ` phil at fsel dot com
2004-05-07  6:58 ` cvs-commit at gcc dot gnu dot org
2004-05-07  7:07 ` cvs-commit at gcc dot gnu dot org
2004-05-07  7:23 ` ebotcazou at gcc dot gnu dot org
2004-05-13  4:41 ` phil at fsel dot com

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).