Issue 24156 - ImportC: Apple uses __signed as a keyword
Summary: ImportC: Apple uses __signed as a keyword
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Mac OS X
: P1 normal
Assignee: No Owner
URL:
Keywords: ImportC, pull
Depends on:
Blocks:
 
Reported: 2023-09-24 11:19 UTC by Chance Snow
Modified: 2023-09-30 09:07 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Chance Snow 2023-09-24 11:19:51 UTC
stdint.h headers use __signed as a keyword with the mac OS SDK.

test.c
-----
#include <stdint.h>

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_int8_t.h
-----
/*
 * Copyright (c) 2012 Apple Inc. All rights reserved.
 * [...]
 */
#ifndef _INT8_T
#define _INT8_T
typedef __signed char           int8_t;
#endif /* _INT8_T */

I'm working around this issue like this for now:

workaround.c
-----
#define __signed
#include <stdint.h>
Comment 1 Dlang Bot 2023-09-30 06:12:31 UTC
@WalterBright created dlang/dmd pull request #15640 "fix Issue 24156 - ImportC: Apple uses __signed as a keyword" fixing this issue:

- fix Issue 24156 - ImportC: Apple uses __signed as a keyword

https://github.com/dlang/dmd/pull/15640
Comment 2 Dlang Bot 2023-09-30 09:07:39 UTC
dlang/dmd pull request #15640 "fix Issue 24156 - ImportC: Apple uses __signed as a keyword" was merged into master:

- de114f8f14d2334a15e354adb7f84bcf5667cba9 by Walter Bright:
  fix Issue 24156 - ImportC: Apple uses __signed as a keyword

https://github.com/dlang/dmd/pull/15640