Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define SIZE_MAX 16
- int my_array[SIZE_MAX];
- int my_array[16];
- #define ARRAY_SIZE 0
- int Array[ARRAY_SIZE] = {};
- main.cpp:3:11: warning: zero size arrays are an extension [-Wzero-length-array]
- int Array[ARRAY_SIZE] = {};
- ^~~~~~~~~~
- main.cpp:1:20: note: expanded from macro 'ARRAY_SIZE'
- #define ARRAY_SIZE 0
- ^
- 1 warning generated.
- static StringRef getImmediateMacroName(SourceLocation Loc,
- const SourceManager &SM,
- const LangOptions &LangOpts) {
- assert(Loc.isMacroID() && "Only reasonble to call this on macros");
- // Walk past macro argument expanions.
- while (SM.isMacroArgExpansion(Loc))
- Loc = SM.getImmediateExpansionRange(Loc).first;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement