Warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated

What do you want to achieve?

Just building projects… Not wanting to use code that soon may not compile.

When building projects that contain Squareline Studio-generated code, compiler throws the following warnings:

warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  106 |                   
  lv_obj_set_style_text_color(ui_LabelTargetPressure, lv_color_hex(0x00FF00), LV_PART_MAIN | LV_STATE_DEFAULT);

This error happens for every LGVL line of code that has a bitwise operator between two enums.

Others

  • SquareLine Studio version: 1.3.4
  • Operating system: Windows 10
  • Target hardware: ESP32
  • Visual Studio Code/Platformio/ platform = espressif32 Framework=Arduino

Thank you for the feedback. It seems your compiler won’t like classic LVGL-8.3 part+state selector code anymore. There’s no workaround for it in SquareLine Studio. But you might get some more insight by checking LV_EXPORT_CONST_INT in lv_conf.h which seems to contain a workaround for those compiler warnings.