Opened 6 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 by , 5 years ago
comment:2 by , 3 years ago
| 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.