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

3.8 merge: Missing some brackets in struct initializers #114

Open
PHHargrove opened this issue May 23, 2016 · 2 comments
Open

3.8 merge: Missing some brackets in struct initializers #114

PHHargrove opened this issue May 23, 2016 · 2 comments

Comments

@PHHargrove
Copy link
Contributor

It appears that in the Berkley UPC test suite there are two tests (bug1080 and bug972) for which clang-upc2c is emitting improper structure initializers.

The warnings (below) did not appear prior to the 3.8 merge. However, that are not due to increased pickiness of the clang (as the backend compiler) because other compilers also began issuing similar warnings after the 3.8 merge.

Example compiler warnings, when configured to use the just-built clang as the backend compiler:

bug1080.upc:16:30: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        bundle_t mybundle = {0};
                             ^
                             {}
1 warning generated.
bug972.upc:6:26: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        struct s10 S1 = {upcr_null_shared};
                         ^~~~~~~~~~~~~~~~
                         {               }
1 warning generated.
@swatanabe
Copy link
Contributor

AMDG

On 05/22/2016 09:40 PM, Paul H. Hargrove wrote:

It appears that in the Berkley UPC test suite there are two tests (bug1080 and bug972) for which clang-upc2c is emitting improper structure initializers.

The warnings (below) did not appear prior to the 3.8 merge. However, that are not due to increased pickiness of the clang (as the backend compiler) because other compilers also began issuing similar warnings after the 3.8 merge.

I'm not convinced that this should be considered
a bug. The issue exists in the original source,
and clang-upc2c is now passing it through unchanged.

Example compiler warnings, when configured to use the just-built clang as the backend compiler:

bug1080.upc:16:30: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        bundle_t mybundle = {0};
                             ^

In Christ,
Steven Watanabe

@PHHargrove
Copy link
Contributor Author

Steven,

When the pointer-to-shared representation is "packed", the current initializers are "OK".

However, when using the struct representation of pointer-to-shared the translation of the 0 to upcr_null_shared would seem to require the now-missing brackets.

-Paul

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

2 participants