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

cpu: Fix array-bounds errors with GCC 6 #5602

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

jnohlgard
Copy link
Member

@jnohlgard jnohlgard commented Jul 5, 2016

Fixes

error: array subscript is above array bounds [-Werror=array-bounds]

which shows up when building with GCC-6 and the peripheral is implemented but not configured in the periph_conf header for the given board.

I have successfully run make buildtest with GCC 6 (arm-none-eabi-gcc-6.1.0 (Gentoo 6.1.0 p1.1) 6.1.0) on my machine for tests/thread_basic and examples/gnrc_networking.

Based on #5601
Fixes #5519

@jnohlgard jnohlgard added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 5, 2016
@jnohlgard jnohlgard added this to the Release 2016.07 milestone Jul 5, 2016
@jnohlgard jnohlgard added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 5, 2016
@jnohlgard
Copy link
Member Author

Also tested: All the tests/periph_* applications compile with GCC 6 now.

@jnohlgard jnohlgard removed the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 6, 2016
@jnohlgard jnohlgard added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 7, 2016
@jnohlgard
Copy link
Member Author

#5601 was merged

@Kijewski
Copy link
Contributor

Kijewski commented Jul 7, 2016

Didn't test it, but doesn't this throw a warning, too, because it's an empty compiling unit now?

@jnohlgard
Copy link
Member Author

jnohlgard commented Jul 7, 2016

It didn't warn on my gcc-6 buildtests. I guess that might be a -pedantic warning?

Anyway, this fix should become obsolete if/when FEATURES_PROVIDED is merged into USEMODULE, to selectively compile the periph files (as was suggested in the, now closed, #3420)

@jnohlgard
Copy link
Member Author

I will add a dont_be_pedantic clause. This should be merged for release since more people will be using GCC-6 in the near future as it gets rolled out into different distributions.

@jnohlgard
Copy link
Member Author

Added empty typedef to avoid pedantic ISO C errors

@kYc0o kYc0o added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 12, 2016
@kYc0o
Copy link
Contributor

kYc0o commented Jul 12, 2016

It's me or Murdock is not working here?

@jnohlgard jnohlgard added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 13, 2016
@jnohlgard
Copy link
Member Author

@kaspar030 do you know why Murdock isn't building this PR?

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 13, 2016
@kaspar030
Copy link
Contributor

Hm, strange. Somehow murdock lost the dictionary that contains the PR's labels, and from that point on it couldn't set new labels anymore. I've restarted murdock, now it builds again.

@kaspar030
Copy link
Contributor

Ok, found the murdock bug, fixed it. Will deploy after the current build.

@OlegHahm OlegHahm added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 13, 2016
@OlegHahm
Copy link
Member

Can you squash, please?

@jnohlgard
Copy link
Member Author

squashed, waiting for Murdock

@OlegHahm
Copy link
Member

ACK and go!

@OlegHahm OlegHahm merged commit 08bcfae into RIOT-OS:master Jul 14, 2016
@jnohlgard jnohlgard deleted the pr/gcc6-fixes branch July 14, 2016 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants