Comments (7)
Thanks for the report.
This appears to be a compiler bug which first surfaced in GCC 10.3. Here's a minimal repro:
https://gcc.godbolt.org/z/4xaY9vfzW
The problem only occurs when "-O2" or higher is enabled, hence it doesn't appear in our CI because we only test with the Debug build configuration (to keep the overall build times low). I'll change that so at least one version of each compiler will also build the RelWithDebInfo configuration.
I'll issue a bug report with GCC.
from gsl-lite.
Awesome, thanks.
I hope I can fix #304 and add the -Wno-error=array-bounds
workaround to the test suite later this week. I'll then issue a bugfix release which also includes the fix to #302.
from gsl-lite.
I'm seeing similar errors on Fedora 33 which is on GCC 10, so this may not be a GCC related issue. Build log for GCC 10 build:
gsl-lite-0.38.0-buildlog-f33-gcc10.txt
from gsl-lite.
Thanks very much. If there's anything we can do to help with this, please do let us know.
from gsl-lite.
Bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100137
For the time being, you can make your build work by adding -Wno-error=array-bounds
to CXXFLAGS
(or -Wno-array-bounds
if you want to suppress the warning entirely).
from gsl-lite.
Thanks, I've added that to our build now.
Fedora currently builds for a number of architectures:
https://fedoraproject.org/wiki/Architectures
- x86_64
- i686
- aarch64
- ppc64le
- armv7hl
- s390x
I'm happy to report that it builds correctly and all tests pass on all architectures apart from s390x. I've filed a separate issue for that here: #304
Here are the test builds:
- Fedora 35/rawhide (GCC 11.0.1): https://koji.fedoraproject.org/koji/taskinfo?taskID=66241363
- Fedora 34 (GCC 11.0.1): https://koji.fedoraproject.org/koji/taskinfo?taskID=66242324
- Fedora 33 (GCC 10.2.1): https://koji.fedoraproject.org/koji/taskinfo?taskID=66242329
from gsl-lite.
RelWithDebInfo CI builds added in f5b5b93, so as expected the build now failed for GCC 10. Added error suppression in subsequent commit 2ad316d.
from gsl-lite.
Related Issues (20)
- `not_null<>` should be hashable HOT 2
- Should `not_null<>` be two different classes? HOT 3
- "illegal instruction" Error when using gsl::span as Kernel Parameter HOT 3
- Test failures on s390x (GCC 10.2.1 and 11.0.1) HOT 7
- Support `narrow<>()` for types without total order
- `not_null<shared_ptr<T>>` not convertible to `weak_ptr<T>` HOT 1
- gsl_FEATURE_GSL_LITE_NAMESPACE not working HOT 3
- Definition of `fail_fast` and of `narrowing_error` triggers `clang`'s `-Wweak-vtables` HOT 2
- gsl_CONFIG_UNENFORCED_CONTRACTS_ASSUME in kernel code HOT 1
- including gsl-lite triggers `-Wuseless-cast` warnings HOT 2
- Add tests for `not_null_ic<>`
- Tests fail to compile due to -Werror=type-limits when char is unsigned HOT 6
- Add CI for non-x86 architectures
- Allow `not_null<void*>` and related. HOT 9
- `not_null`'s evaluation of nullness can lead to *very* cryptic errors. HOT 10
- Suppress warnings in lest via system include
- Comparison of `std::optional<not_null<T>>` and `not_null<T>` is ambiguous HOT 2
- gsl::span works differently than std::span in terms of type matching? HOT 2
- 0.41.0: not ready to be build with `-D_FORTIFY_SOURCE=3` HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gsl-lite.