[Issue 21934] importC: Support asm labels to specify the assembler name to use for a C symbol

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 21 00:43:55 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21934

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to aminya from comment #3)
> I wanted to add more examples that don't work with importC. These snippets
> are generated by gcc (mingw)
> 
> Error: `=`, `;` or `,` expected
> ```
> extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void
>     __attribute__((__cdecl__)) __debugbreak(void) {
>   __asm__ __volatile__("int {$}3" :);
> }
> ```
> Error: `=`, `;` or `,` expected
Please raise a new issue for supporting `__inline__`.

> ```
> errno_t __attribute__((__cdecl__)) _get_errno(int *_Value);
> ```
> Error: `=`, `;` or `,` expected
Dupicate of issue 21937.

> ```
> typedef struct {
>   long long __max_align_ll __attribute__((__aligned__(__alignof__(long
> long))));
>   long double __max_align_ld
>       __attribute__((__aligned__(__alignof__(long double))));
> # 427
> "c:\\lib\\mingw\\tools\\install\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\10.2.
> 0\\include\\stddef.h" 3 4
> } max_align_t;
> # 33
> "c:\\lib\\mingw\\tools\\install\\mingw64\\x86_64-w64-
> mingw32\\include\\stdint.h" 2 3 4
> ```
1. Raise a new bug report for invalid error:
---
struct Foo {
  int var;
#1 "foo.c" 3 4
};
---

2. Raise a new bug report for ICE:
---
typedef struct {
  long var;
} Foo;
---

> 
> Error: illegal combination of type specifiers
> ```
> __extension__ typedef long long __time64_t;
> __extension__ typedef long long int64_t;
> __extension__ typedef unsigned long long uint64_t;
> __extension__ typedef long long int_least64_t;
> __extension__ typedef unsigned long long uint_least64_t;
> __extension__ typedef long long int_fast64_t;
> __extension__ typedef unsigned long long uint_fast64_t;
> ```
Raise a new bug report for supporting `__extension__`.

--


More information about the Digitalmars-d-bugs mailing list