Skip to content

scanner: allow #defines to expand to other #defines

While this would generate a proper symbol for LALA_THREE:

  enum { LALA_ONE=1, LALA_TWO=2 };
  #define LALA_THREE (LALA_ONE + LALA_TWO)

This would not:

  #define LALA_ONE 1
  #define LALA_TWO 2
  #define LALA_THREE (LALA_ONE + LALA_TWO)

No reason for that. Let's insert the defines into const table just like we do for enums.

The test is the same as in !366 (merged)

Merge request reports