Bug 32056
Summary: | g++ does not detect non-integral in-class initializer | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Wagner T. Correa <wtcorrea> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | wtcorrea |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-03-17 04:29:47 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Wagner T. Correa
2001-03-17 04:29:44 UTC
No, it does detect it, but handles this as an extension to the standard. If you want a warning, simply run g++ with -pedantic, if you want this to be an error, run with -pedantic-errors: g++ -pedantic-errors test.C test.C:6: ISO C++ forbids initialization of member constant `EPS' of non-integral type `const float' |