haskell / haskell/c2hs

c2hs seems to have issue with C11 _Noreturn function specifier.

Open
#159 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
211
Forks
52
PR merge metrics
No merged PRs in 30d

Description

Noticed this on alpine linux 3.3.1 when compiling the ncurses package.

The error log:

```
Configuring ncurses-0.2.15...
Building ncurses-0.2.15...
Preprocessing library ncurses-0.2.15...
c2hs: C header contains errors:

/usr/include/stdlib.h:44: (column 11) [ERROR] >>> Syntax error !
The symbol `void' does not fit here.
```

And that section of stdlib.h:

```
_Noreturn void abort (void);
int atexit (void (*) (void));
_Noreturn void exit (int);
_Noreturn void _Exit (int);
int at_quick_exit (void (*) (void));
_Noreturn void quick_exit (int);
```

I think it would be ok to just ignore _Noreturn in these cases correct? The function specifier doesn't really change the fact that its a function just specifies that these functions never return to their caller. I couldn't find anything in the source that seems to indicate _Noreturn is parsed at all but if I missed it let me know.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.