Opened 5 years ago
#159 new defect
Static expression evaluation
Reported by: | pabuhr | Owned by: | |
---|---|---|---|
Priority: | major | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description
Some static expression evaulation is necessary for constructor designators. Other static expressions can be left for gcc. Currently, CFA does not ignore evaulating static expressions it doesn't need and can't evaulate the ones it does need, e.g.
enum { A = 1 / sizeof(int) // sizeof is not evaulated by CFA and returns 0 }; int mask[ A ]; // force static evaluation of expression for A
causes a division by zero exception in cfa-cc.
Note: See
TracTickets for help on using
tickets.