[LLVMbugs] [Bug 5172] Clang need to implement '#pragma redefine_extname' to support C++ on Solaris.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 2 03:59:50 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=5172

Dmitri Shubin <sbn at tbricks.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |sbn at tbricks.com
         Resolution|FIXED                       |

--- Comment #11 from Dmitri Shubin <sbn at tbricks.com> 2012-05-02 05:59:50 CDT ---
clang behavior wrt this pragma still differs from GCC and Sun Studio C++ on
Solaris:

$ cat -n a.cpp
     1  extern "C" {
     2
     3  struct statvfs64 {
     4  };
     5
     6  #pragma redefine_extname statvfs64 statvfs
     7
     8  int statvfs64(struct statvfs64 *);
     9
    10  }
    11
    12  int main()
    13  {
    14      struct statvfs64 st;
    15      statvfs64(&st);
    16      return 0;
    17  }
$ /opt/clang/bin/clang++ -c a.cpp && nm a.o | grep statvfs
[8]     |         0|         0|NOTY |GLOB |0    |UNDEF  |statvfs64
$ /opt/csw/gcc4/bin/g++ -c a.cpp && nm a.o | grep statvfs
[8]     |         0|         0|NOTY |GLOB |0    |UNDEF  |statvfs
 $ CC -c a.cpp && nm a.o | grep statvfs
[22]    |         0|         0|FUNC |GLOB |0    |UNDEF  |statvfs
$ /opt/clang/bin/clang++ -v
clang version 3.1 (branches/release_31 155814)
Target: i386-pc-solaris2.10
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list