www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24156] New: ImportC: Error: illegal combination of type

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

          Issue ID: 24156
           Summary: ImportC: Error: illegal combination of type specifiers
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: git chancesnow.me

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>

--
Sep 24 2023