[EXT_EP-8558] Constant initialiation may take place before dynamic initialization Created: 29/Nov/17 Updated: 26/Mar/26 |
|
| Status: | New |
| Project: | Embedded Software & Tools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Low |
| Reporter: | TI User | Assignee: | TI User |
| Resolution: | Unresolved | Votes: | 0 |
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Product: | Code Generation Tools |
| Internal ID: | CODEGEN-3993 |
| Found In Release: | ARM_18.1.0.LTS MSP430_18.1.0.LTS MSP430_20.2.0.LTS ARM_18.12.0.LTS MSP430_21.6.0.LTS MSP430_18.12.0.LTS ARM_20.2.0.LTS |
| Release Notes: | In the following code, the rvalue reference 'br' will be initialized after the variable 'a', even though 'br' is constant initialized and 'a' is dynamically initialized. This ordering is required by C++14 Section 3.6.2 paragraph 2.
extern int a; extern int f(); int a = f(); int&& br = 5; int f() { return br; } int main() { if (a != 5) return 1; return 0; } |
| Description |
|
Constant initialiation may take place before dynamic initialization |