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

possible scoping issue in declarations #267

Closed
monniaux opened this issue Feb 2, 2019 · 2 comments
Closed

possible scoping issue in declarations #267

monniaux opened this issue Feb 2, 2019 · 2 comments

Comments

@monniaux
Copy link
Contributor

monniaux commented Feb 2, 2019

I've come across some code that was doing something like that:

char s[]="miaou", buf[sizeof s];

This code compiles with gcc -std=c99 -pedantic but not with ccomp, which complains that s is undefined when it tries to get its sizeof.

This is not much important, one can easily work around it by using two separate declarations.

@m-schmidt
Copy link
Member

Thanks for the report. We discovered something similar recently and will investigate.

@xavierleroy
Copy link
Contributor

Bug is confirmed. The following commit by @bschommer fixes it: 99918e4

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