Factor out common type combination
commit38ab621b55efbf74a130c5423ecaa93de05f3454
authorMichael Matz <matz@suse.de>
Sat, 18 Jan 2020 01:36:29 +0000 (18 02:36 +0100)
committerMichael Matz <matz@suse.de>
Wed, 15 Apr 2020 00:44:12 +0000 (15 02:44 +0200)
tree8d614839877581bc42ebcf98892eded82088e9a5
parentc085645f981bcefb52d0d42712cbbdc350c12453
Factor out common type combination

as there's overlap between handling types for binary and ternay
operations.  Factor this into a single routine (combine_types).
This uses the structure that gen_op was following, and expr_cond
was using as well in the past, which I find easier to reconvene
with the standard language.  But it reuses the new functions for
diagnostics to improve (a little) on what GCC or clang produce :)
tccgen.c
tests/tests2/33_ternary_op.expect