You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Extended Description
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
The text was updated successfully, but these errors were encountered: