Opened 4 years ago

Closed 22 months 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 4 years ago by ajbeach

Duplicated in #171, which contains some other (possibly useful) information.

comment:2 Changed 22 months ago by Thierry Delisle

Resolution: fixed
Status: newclosed

Fixed but not with proper constexpr. I just hacked it in in codegen.

Note: See TracTickets for help on using tickets.