Skip to content
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

Support #pragma in struct declarations #221

Closed
ldore opened this issue Nov 22, 2017 · 1 comment
Closed

Support #pragma in struct declarations #221

ldore opened this issue Nov 22, 2017 · 1 comment

Comments

@ldore
Copy link
Contributor

ldore commented Nov 22, 2017

Pragmas do not seem to be supported within typedefs.
Updating tests.test_c_generator.TestCtoC.test_pragma to:

    def test_pragma(self):
        self._assert_ctoc_correct(r'''
            #pragma foo
            void f() {
                #pragma bar
                i = (a, b, c);
            }
            typedef struct s {
            #pragma baz
            } s;
        ''')

raises a ParseError.

This occured in a source similar to:

typedef struct MyStruct {
    int a;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
    int b;
#pragma GCC diagnostic pop
}
@myint
Copy link

myint commented Apr 17, 2018

Perhaps this should be closed (#222)?

@eliben eliben closed this as completed Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants