will gcc optimize switch on a constant variable

前端 未结 0 1178
孤独总比滥情好
孤独总比滥情好 2021-02-20 09:40

as for the following pure c code:

typedef enum eFoo_t
{
  FOO_ONE,
  FOO_TWO
} eFoo;

typedef struct Foo_s
{
  const eFoo x;
  void (*f) (const eFoo x);
  void (*         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题