Opened 6 years ago
#148 new defect
Incorrect "Initializer is too deep" error
| Reported by: | Thierry Delisle | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | cfa-cc |
| Version: | 1.0 | Keywords: | |
| Cc: |
Description
The code :
struct Global {
int * a;
struct {
int a;
} c;
int d;
};
Global g1 = { 0p, {6}, 6 };
Should not lead to the error :
error: Managed object's initializer is too deep g1: instance of struct Global with body 1 with initializer (maybe constructed)
Compound initializer:
Simple Initializer: Applying untyped:
Name: intptr
...to:
Explicit Cast of:
constant expression (0 0: signed int)
... to:
unsigned long int
Compound initializer:
Simple Initializer: constant expression (6 6: signed int)
Simple Initializer: constant expression (6 6: signed int)
Note:
See TracTickets
for help on using tickets.