1929 expr->op = SPECIAL_EQUAL;
1930 expr->left = arg;
1931 expr->right = alloc_expression(expr->pos, EXPR_FVALUE);
1932 expr->right->ctype = ctype;
1933 expr->right->fvalue = 0;
1934 } else if (is_fouled_type(ctype)) {
1935 warning(expr->pos, "%s degrades to integer",
1936 show_typename(ctype->ctype.base_type));
1937 }
1938 /* the result is int [6.5.3.3(5)]*/
1939 ctype = &int_ctype;
1940 break;
1941
1942 default:
1943 break;
1944 }
1945 expr->ctype = ctype;
1946 return ctype;
1947 }
1948
1949 static struct symbol *find_identifier(struct ident *ident, struct symbol_list *_list, int *offset)
1950 {
1951 struct ptr_list *head = (struct ptr_list *)_list;
1952 struct ptr_list *list = head;
1953
1954 if (!head)
1955 return NULL;
1956 do {
1957 int i;
1958 for (i = 0; i < list->nr; i++) {
1959 struct symbol *sym = (struct symbol *) list->list[i];
1960 if (sym->ident) {
1961 if (sym->ident != ident)
1962 continue;
1963 *offset = sym->offset;
1964 return sym;
1965 } else {
1966 struct symbol *ctype = sym->ctype.base_type;
1967 struct symbol *sub;
1968 if (!ctype)
1969 continue;
|
1929 expr->op = SPECIAL_EQUAL;
1930 expr->left = arg;
1931 expr->right = alloc_expression(expr->pos, EXPR_FVALUE);
1932 expr->right->ctype = ctype;
1933 expr->right->fvalue = 0;
1934 } else if (is_fouled_type(ctype)) {
1935 warning(expr->pos, "%s degrades to integer",
1936 show_typename(ctype->ctype.base_type));
1937 }
1938 /* the result is int [6.5.3.3(5)]*/
1939 ctype = &int_ctype;
1940 break;
1941
1942 default:
1943 break;
1944 }
1945 expr->ctype = ctype;
1946 return ctype;
1947 }
1948
1949 struct symbol *find_identifier(struct ident *ident, struct symbol_list *_list, int *offset)
1950 {
1951 struct ptr_list *head = (struct ptr_list *)_list;
1952 struct ptr_list *list = head;
1953
1954 if (!head)
1955 return NULL;
1956 do {
1957 int i;
1958 for (i = 0; i < list->nr; i++) {
1959 struct symbol *sym = (struct symbol *) list->list[i];
1960 if (sym->ident) {
1961 if (sym->ident != ident)
1962 continue;
1963 *offset = sym->offset;
1964 return sym;
1965 } else {
1966 struct symbol *ctype = sym->ctype.base_type;
1967 struct symbol *sub;
1968 if (!ctype)
1969 continue;
|