Issue 87514
Summary [flang] Support `-dM` flag
Labels flang
Assignees
Reporter bcornille
    In discussion with a customer asking what predefined macro could be used to identify the flang compiler, I found could not get the set of predefined macros out of the compiler in the same way as clang.
```
>> clang -dM -E - < /dev/null
...

#define __clang__ 1
#define __clang_literal_encoding__ "UTF-8"
#define __clang_major__ 19
#define __clang_minor__ 0
#define __clang_patchlevel__ 0
...
```
```
>> flang-new -dM -E - < /dev/null
flang-new: error: unknown argument: '-dM'
```
It would be good for this flag to be supported both so that flang is consistent with both clang and gfortran/gcc, but also so the predefined macros are discoverable by users so they can use them in their codes.

CC: @kparzysz, @mjklemm 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to