[LLVMbugs] [Bug 8888] New: [MS Bugs] char/signed char decl compatibility.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jan 2 15:40:38 PST 2011


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

           Summary: [MS Bugs] char/signed char decl compatibility.
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bigcheesegs at gmail.com
                CC: llvmbugs at cs.uiuc.edu, pichet2000 at gmail.com


MSVC allows the following in C mode (in C++ it's always legal because of
overloading) while clang (correctly) does not. Clang should support this in
ms-extensions mode, although I do not yet know the exact semantics (does it use
signed or unsigned?).

int __cdecl _access( const char * _Filename, int _AccessMode);
int __cdecl _access( const signed char *path,int amode)
{
  return 0;
}

C:\Users\Michael\Projects\msvcrt\research>clang -fsyntax-only double-decl.c
double-decl.c(2) :  error: conflicting types for '_access'
int __cdecl _access( const signed char *path,int amode)
            ^
double-decl.c(1) :  note: previous declaration is here
int __cdecl _access( const char * _Filename, int _AccessMode);
            ^
1 error generated.

C:\Users\Michael\Projects\msvcrt\research>clang++ -fsyntax-only -x c++
double-decl.c

C:\Users\Michael\Projects\msvcrt\research>cl -Zs double-decl.c -nologo

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