Opened 5 years ago
Closed 3 years ago
#160 closed defect (fixed)
Constant 0p (NULL) does not work at the global declaration level
Reported by: | pabuhr | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description ¶
int & q = *0p; // does not work int main() { int & q = *0p; // works }
The reason the global usage fails is that 0p is a function call, but at the global level, this call must be wrapped into a constructor and it is not wrapped.
Other global function calls are wrapped correctly.
Change History (2)
comment:1 Changed 5 years ago by
comment:2 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed but not with proper constexpr. I just hacked it in in codegen.
Note: See
TracTickets for help on using
tickets.
Duplicated in #171, which contains some other (possibly useful) information.