Bug 2082521
| Summary: | Cannot mix GCC and C++11 / C23 attribute syntax. | ||
|---|---|---|---|
| Product: | Red Hat Developer Toolset | Reporter: | pbhosale |
| Component: | gcc | Assignee: | Martin Cermak <mcermak> |
| gcc sub component: | gcc-toolset-12 | QA Contact: | Martin Cermak <mcermak> |
| Status: | CLOSED NEXTRELEASE | Docs Contact: | |
| Severity: | medium | ||
| Priority: | unspecified | CC: | dmalcolm, jakub, mcermak, mnewsome, mpolacek, ohudlick, sipoyare |
| Version: | DTS 11.0 RHEL 7 | Keywords: | Bugfix, Triaged |
| Target Milestone: | alpha | ||
| Target Release: | 9.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-06-07 14:02:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I think this will be CLOSED|UPSTREAM, because even if we fix it in upstream, it would be only fixed in DTS13. I've fixed this in GCC 13. Since the patch is simple, I could backport to DTS/GTS 12. Is this important enough to warrant the backports? I'd worry if upstream GCC 12 and DTS/GTS 12 differed in something so much user visible like this. People who develop on DTS/GTS would then be surprised it doesn't work with GCC 12 elsewhere. In that case let's not do the backports. Therefore this will be fixed in GTS 13. |
Description of problem: GCC from DTS 11 on RHEL 7.9 rejects __attribute__((visibility("default"))) and C++11 / C23 attribute [[nodiscard]] for struct and class but accept the same mix for function. The issue is already known: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102399 Version-Release number of selected component (if applicable): How reproducible: when user try to use [[nodiscard]] attribute on struct or class already having __attribute__((visibility("default"))) Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: