mescc: Tinycc support: Fix for ?-operator.
This commit is contained in:
parent
70cb56025f
commit
e3a8316184
|
@ -222,7 +222,6 @@ broken="$broken
|
|||
28_strings
|
||||
|
||||
31_args
|
||||
32_led
|
||||
34_array_assignment
|
||||
37_sprintf
|
||||
38_multiple_array_index
|
||||
|
|
|
@ -305,15 +305,15 @@
|
|||
(let ((rank (pointer->rank pointer)))
|
||||
(rank+= (ast->type type info) rank)))
|
||||
|
||||
((decl-spec-list (type-spec ,type))
|
||||
(ast->type type info))
|
||||
((decl-spec-list (type-spec ,type)) (ast->type type info))
|
||||
|
||||
;; `typedef int size; void foo (unsigned size u)
|
||||
;; ;; `typedef int size; void foo (unsigned size u)
|
||||
((decl-spec-list (type-spec ,type) (type-spec ,type2))
|
||||
(ast->type type info))
|
||||
|
||||
((assn-expr ,a ,op ,b)
|
||||
(ast->type a info))
|
||||
((assn-expr ,a ,op ,b) (ast->type a info))
|
||||
|
||||
((cond-expr _ ,a ,b) (ast->type a info))
|
||||
|
||||
(_ (get-type o info))))
|
||||
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
#include "30-test.i"
|
||||
#include <stdio.h>
|
||||
|
||||
union foo
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
int
|
||||
test ()
|
||||
{
|
||||
|
@ -33,7 +38,10 @@ test ()
|
|||
(one == 1) ? 1 : exit (1);
|
||||
|
||||
puts ("t: (f) ?\n");
|
||||
(f) ? exit (1) : 1;
|
||||
(f) ? exit (2) : 1;
|
||||
|
||||
union foo fu;
|
||||
fu.i = 1 ? 0 : 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue