Opened 16 years ago

Closed 16 years ago

#251 closed defect (fixed)

initializing null pointer variable

Reported by: Stephen Siegel Owned by: zirkel
Priority: major Milestone: 1.1
Component: front Version: 1.1
Keywords: grammar void pointer struct Cc:

Description

In libmpi.c, MPI_Request is defined as follows:

typedef  struct MPIX_Comm_Record {
  int id;
} MPIX_Comm_Record;

typedef MPIX_Comm_Record *MPI_Request;

After that I want do say this, but it does not parse:

MPI_Request MPI_REQUEST_NULL = (MPI_Request)NULL;

but this does:

MPI_Request MPI_REQUEST_NULL = (MPIX_Comm_Record*)NULL;

Change History (3)

comment:1 by Stephen Siegel, 16 years ago

Milestone: Release 1.01.1
Version: 1.01.1

comment:2 by zirkel, 16 years ago

Owner: changed from bperry to zirkel
Status: newaccepted

comment:3 by zirkel, 16 years ago

Resolution: fixed
Status: acceptedclosed

The problem was caused by a bug in the grammar. Casts in assignments were being evaluated as postfix expressions. This was temporarily resolved by moving the rule for casts to the first item under unary_expr. This should probably be changed to match the C grammar.

Note: See TracTickets for help on using tickets.