https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82200

            Bug ID: 82200
           Summary: Failed to use __asm under macOS 10.13
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 191919 at gmail dot com
  Target Milestone: ---

I tried to compile the following source code:

```
#include <syslog.h>

int main() {}
```

with gcc-7.2.0 under macOS 10.13, I got these error messages:

```
In file included from /usr/include/sys/cdefs.h:587:0,
                 from /usr/include/sys/syslog.h:65,
                 from /usr/include/syslog.h:23,
                 from sl.c:1:
/usr/include/sys/syslog.h:227:124: error: expected ‘,’ or ‘;’ before ‘__asm’
 void syslog(int, const char *, ...) __printflike(2, 3) __not_tail_called
__DARWIN_ALIAS_STARTING(__MAC_10_13, __IPHONE_NA, __DARWIN_EXTSN(syslog));
```

where __DARWIN_EXTSN is defined as:

(in /usr/include/sys/cdefs.h)

#define __DARWIN_EXTSN(sym)             __asm("_" __STRING(sym)
__DARWIN_SUF_EXTSN)

It seems that __asm is not implemented.

I compiled gcc-7.2.0 by this configuration:

../gcc-7.2.0/configure --prefix=/opt --enable-languages=c,c++,objc,obj-c++

Reply via email to