-
-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Issue 21937 - importC: Support parsing __attribute__ specifiers #12569
Conversation
|
Thanks for your pull request, @ibuclaw! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#12569" |
d24b1a7 to
8265212
Compare
|
Alright, I think I've covered all obvious bases. Mind reviewing @thewilsonator / @RazvanN7? Doesn't need to be merged immediately, to allow @WalterBright at least 72 hours to check it first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC we currently ignore the meaning of attributes that have direct d equivalents?
Yes, that is for issue 21938 to solve. |
| @@ -2644,6 +2681,15 @@ final class CParser(AST) : Parser!AST | |||
| const loc = token.loc; | |||
| nextToken(); | |||
|
|
|||
| /* GNU Extensions | |||
| * enum-specifier: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to (the closest thing to a) specification from the horse's (gnu's?) mouth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function cparseGnuAttributes has the link, I don't think it is worth repasting it everywhere.
For your review this is it.
https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
As you will see, it uses hand wavy words rather than clear, concise grammar to describe how it is parsed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibuclaw Must've missed that my bad, thanks for the good work
Only parses
__attribute__, ignored its contents for now. @WalterBright