nilist = Safe_alloc (sizeof (initList));
nilist->type = type;
- nilist->lineno = yylineno;
+ nilist->lineno = mylineno;
switch (type)
{
return constVal ("0");
}
- val->type = val->etype = newLink ();
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink (SPECIFIER);
SPEC_NOUN (val->type) = V_FLOAT;
SPEC_SCLS (val->type) = S_LITERAL;
SPEC_CVAL (val->type).v_float = sval;
val = newValue (); /* alloc space for value */
- val->type = val->etype = newLink (); /* create the spcifier */
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink (SPECIFIER); /* create the spcifier */
SPEC_SCLS (val->type) = S_LITERAL;
// let's start with an unsigned char
SPEC_NOUN (val->type) = V_CHAR;
val = newValue (); /* get a new one */
/* get a declarator */
- val->type = newLink ();
+ val->type = newLink (DECLARATOR);
DCL_TYPE (val->type) = ARRAY;
- val->type->next = val->etype = newLink ();
- val->etype->class = SPECIFIER;
+ val->type->next = val->etype = newLink (SPECIFIER);
SPEC_NOUN (val->etype) = V_CHAR;
SPEC_SCLS (val->etype) = S_LITERAL;
val = newValue ();
- val->type = val->etype = newLink ();
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink (SPECIFIER);
SPEC_NOUN (val->type) = V_CHAR;
SPEC_USIGN(val->type) = 1;
SPEC_SCLS (val->type) = S_LITERAL;
/* create a new value */
val = newValue ();
- val->type = val->etype = newLink ();
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink (SPECIFIER);
SPEC_NOUN (val->type) = (IS_FLOAT (lval->etype) ||
IS_FLOAT (rval->etype) ? V_FLOAT : V_INT);
SPEC_SCLS (val->type) = S_LITERAL; /* will remain literal */
/* create a new value */
val = newValue ();
- val->type = val->etype = newLink();
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink(SPECIFIER);
SPEC_NOUN (val->type) = (IS_FLOAT (lval->etype) ||
IS_FLOAT (rval->etype) ? V_FLOAT : V_INT);
SPEC_SCLS (val->etype) = S_LITERAL;
/* create a new value */
val = newValue ();
- val->type = val->etype = newLink ();
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink (SPECIFIER);
SPEC_NOUN (val->type) = V_INT; /* type is int */
SPEC_SCLS (val->type) = S_LITERAL; /* will remain literal */
SPEC_USIGN (val->type) = (SPEC_USIGN (lval->etype) & SPEC_USIGN (rval->etype));
/* create a new value */
val = newValue ();
- val->type = val->etype = newLink ();
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink (SPECIFIER);
SPEC_NOUN (val->type) = (IS_FLOAT (lval->etype) ||
IS_FLOAT (rval->etype) ? V_FLOAT : V_INT);
SPEC_SCLS (val->type) = S_LITERAL; /* will remain literal */
/* create a new value */
val = newValue ();
- val->type = val->etype = newLink ();
- val->type->class = SPECIFIER;
+ val->type = val->etype = newLink (SPECIFIER);
SPEC_NOUN (val->type) = (IS_FLOAT (lval->etype) ||
IS_FLOAT (rval->etype) ? V_FLOAT : V_INT);
SPEC_SCLS (val->type) = S_LITERAL; /* will remain literal */
SNPRINTF (val->name, sizeof(val->name), "(%s + %d)", buffer,
(int) AST_LIT_VALUE (arrExpr->right) * size);
- val->type = newLink ();
+ val->type = newLink (DECLARATOR);
if (SPEC_SCLS (arrExpr->left->etype) == S_CODE)
{
DCL_TYPE (val->type) = CPOINTER;
SNPRINTF (val->name, sizeof(val->name), "(%s + %d)", buffer,
(int) sym->offset);
- val->type = newLink ();
+ val->type = newLink (DECLARATOR);
if (SPEC_SCLS (structT->etype) == S_CODE)
{
DCL_TYPE (val->type) = CPOINTER;