Bug 23701 – ImportC: __int64 is not documented as supported Visual C extension

Status
RESOLVED
Resolution
WONTFIX
Severity
major
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2023-02-12T15:37:50Z
Last change time
2023-12-14T06:29:07Z
Keywords
accepts-invalid, ImportC
Assigned to
No Owner
Creator
Iain Buclaw
Depends on
23689
See also
https://issues.dlang.org/show_bug.cgi?id=23689

Comments

Comment #0 by ibuclaw — 2023-02-12T15:37:50Z
When compiling the test with `gcc -std=c11 -fsyntax-only` compilable/test23214.c:3:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uintptr_t’ 3 | typedef unsigned __int64 uintptr_t; | ^~~~~~~~~ Test: ``` // https://issues.dlang.org/show_bug.cgi?id=23214 typedef unsigned __int64 uintptr_t; ```
Comment #1 by bugzilla — 2023-02-20T07:02:50Z
__int64 is a Microsoft C extension.
Comment #2 by ibuclaw — 2023-02-20T11:34:35Z
(In reply to Walter Bright from comment #1) > __int64 is a Microsoft C extension. Which needs documenting then https://dlang.org/spec/importc.html#visualc-extensions
Comment #3 by bugzilla — 2023-02-21T07:12:14Z
I take that back. importc.h has a #define for it: #define __int64 long long
Comment #4 by ibuclaw — 2023-02-21T10:44:47Z
(In reply to Walter Bright from comment #3) > I take that back. importc.h has a #define for it: > > #define __int64 long long Should we be testing for things defined in `importc.h` then? :-) At best, they should all be in a clearly named test file so that it's obvious we're not actually testing ImportC, but rather our druntime-defined header.
Comment #5 by bugzilla — 2023-06-01T06:55:37Z
(In reply to Iain Buclaw from comment #4) > (In reply to Walter Bright from comment #3) > > I take that back. importc.h has a #define for it: > > > > #define __int64 long long > Should we be testing for things defined in `importc.h` then? :-) We already do, but they are kinda sprinkled in among the .c and .i tests. Not really sure if they should be documented with the compiler or not.
Comment #6 by bugzilla — 2023-12-14T06:29:07Z
I'm not sure we should document macros in importc.h in the specification for ImportC. Other compilers don't do it (leaving a lot of macros undocumented in the various .h system files), and it really isn't part of the compiler. It's pretty obvious what they do in importc.h, anyway. So I'm going to mark this WONTFIX for the time being.