Changes between Version 3 and Version 6 of Ticket #203


Ignore:
Timestamp:
Sep 8, 2020, 10:28:48 PM (4 years ago)
Author:
mlbrooks
Comment:

Modified the test program for accuracy with our compiler's current behaviour. Resolver behaviour that now works (since fix of #189) moved to section "Related things that do not produce errors," which removes error cases 4 and 5 and splits cases 3 and 4. Additionally, in cases 3 and 4, having the declaration in a function works (so that's now under "Related things that do not produce errors") while having the declaration be global does not work (so that's now shown with the now-reachable GCC error).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #203 – Description

    v3 v6  
    6262
    6363#elif SHOW_ERROR == 3
    64 // 2 alternatives:
     64// GCC: initializer element is not constant
    6565wrap_c(int) error_obj @= { count_obj };
    6666
    6767#elif SHOW_ERROR == 4
    68 void local(void) {
    69     // 2 alternatives:
    70     wrap_c(char) error_obj @= { inner_obj };
    71 }
    72 
    73 #elif SHOW_ERROR == 5
    74 // 2 alternatives:
    75 child_vtable(int) child_vtable_instance = {
    76     &base_vtable_instance
    77 };
    78 
    79 #elif SHOW_ERROR == 6
    80 // 2 alternatives:
    81 child_vtable(char) child_vtable_instance @= {
    82     &base_vtable_instance
    83 };
     68// GCC: initializer element is not constant
     69wrap_c(char) error_obj @= { count_obj };
    8470
    8571#elif SHOW_ERROR == 7
     
    10995wrap_o(char) wrap_obj @= { 'c' };
    11096
     97// related to SHOW_ERROR == 3
     98void local_case3() {
     99    // correctly picks preferred among 2 alternatives
     100    wrap_c(int) error_obj @= { count_obj };
     101}
     102
     103// related to SHOW_ERROR == 4
     104void local_case4() {
     105    // correctly picks preferred among 2 alternatives
     106    wrap_c(char) error_obj @= { count_obj };
     107}
     108
     109// formerely SHOW_ERROR == 5
     110// correctly picks preferred among 2 alternatives
     111child_vtable(int) child_vtable_instance = {
     112    &base_vtable_instance
     113};
     114
     115// formerely SHOW_ERROR == 6
     116// correctly picks preferred among 2 alternatives
     117child_vtable(char) child_vtable_instance @= {
     118    &base_vtable_instance
     119};
     120
     121
    111122int main(void) {
    112123    wrap_e(int) wrap_obj = { empty_obj };