What is the purpose of a these #define within an enum?

前端 未结 5 1113
借酒劲吻你
借酒劲吻你 2020-12-01 11:56

I found this code in the linux headers, /usr/include/dirent.h:

enum   
  {    
    DT_UNKNOWN = 0,
# define DT_UNKNOWN DT_UNKNOWN
    DT_FIFO = 1,
# define D         


        
5条回答
  •  时光取名叫无心
    2020-12-01 12:37

    I used -E and -dD arguments (and also -fdump-tree-all) in gcc to see the preprocessor output and found nothing useful. So I guess this code does not have any functionality other than perhaps displaying the symbolic names when debugging using a debugger like gdb.

提交回复
热议问题