瀏覽代碼

Merge pull request #3158 from zhang456xi/fix_marco_issue

修复了g++编译器无法展开自动初始化宏的错误
Bernard Xiong 5 年之前
父節點
當前提交
cedeca63be
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      include/rtdef.h

+ 2 - 2
include/rtdef.h

@@ -200,11 +200,11 @@ typedef int (*init_fn_t)(void);
         };
         #define INIT_EXPORT(fn, level)                                                       \
             const char __rti_##fn##_name[] = #fn;                                            \
-            RT_USED const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn."level) = \
+            RT_USED const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn." level) = \
             { __rti_##fn##_name, fn};
     #else
         #define INIT_EXPORT(fn, level)                                                       \
-            RT_USED const init_fn_t __rt_init_##fn SECTION(".rti_fn."level) = fn
+            RT_USED const init_fn_t __rt_init_##fn SECTION(".rti_fn." level) = fn
     #endif
 #endif
 #else