• Orivej Desh's avatar
    Fix support for C++ enum classes · 94c5ad67
    Orivej Desh authored
    The current code fails to compile with:
    
    <source>:3:54: error: invalid operands to binary expression ('enum E' and 'enum E')
    const enum E neg_one_class_29 = (enum E) ((enum E) 0 - (enum E) 1);
                                              ~~~~~~~~~~ ^ ~~~~~~~~~~
    
    This change reverts to the code that was before #2186 but silences erroneous GCC warning enabled by -Wconversion (which is not a part of -Wall).
    
    Fixes #2749
    94c5ad67
TypeConversion.c 34.4 KB