-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
language-c and C11 support #4
Comments
So this particular problem would be fixed if language.c supports the _Noreturn function specifier (C11 6.7.4). Extending Lexer and Parser is trivial. However, the only other function specifier so far was inline, and because of this, function specifiers are not treated in an uniform way in Language.C. Supporting a second function specifier in a proper way will thus require some effort. |
In order to evaluate the changes necessary for proper C11 support, I reran gcc.dg test suite with language.c 0.5.0. The following (not necessarily complete) list of features needs to be implemented:
There are a couple of unsupported GNU extensions as well (e.g. auto types), but first aiming at C11 compatibility seems like a good idea. If an unsupported GNU extension is used in system headers, it should be prioritized as well. |
I too would love to see C11 support, especially _Generic. |
I just encountered this issue with EDIT: It looks like these are extensions, not C11 features. |
Yes, |
This issue still exists: vmchale/libarchive#12 Especially |
I'd be very happy to merge any patch improving C11 support.
I do believe that other specifiers such as nonnull are working though, so
maybe alignas would be an easy fix (I was under the misapprehension that it
worked already in fact!).
…On Wed, 25 Aug 2021, 2:58 am Julian Ospald, ***@***.***> wrote:
This issue still exists: vmchale/libarchive#12
<vmchale/libarchive#12>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXBNK2FONNHYUXGSXRTT6PTWZANCNFSM4B5JNPSA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Originally reported this to c2hs here and was noted that language-c is providing all of the usefulness: haskell/c2hs#159
Noticed on alpine linux 3.3.1 when compiling the ncurses package. Are there plans for language-c and C11 support? I know this pacage looks to just have changed ownership, and the haskell is a bit beyond my current ability at this point or I'd try to add a fix for the _Noreturn case I hit.
The error log:
And that section of stdlib.h:
For now I just patch stdlib.h and remove the _Noreturn's to work around this:
https://github.com/mitchty/alpine-linux-ghc-bootstrap/blob/master/test-7.10/Dockerfile#L19
But I think a more general approach would be to have language-c start to support C11 constructs. I don't think full on generic support is really needed yet or anything from the appendices.
The text was updated successfully, but these errors were encountered: