Community
cancel
Showing results for 
Search instead for 
Did you mean: 
eldiener
New Contributor I
306 Views

List predefined macros

In the Intel C++ Windows compiler is there a compiler command that will output the list of predefined macros to the console window ?

0 Kudos
8 Replies
AbhishekD_Intel
Moderator
306 Views

Hi,

There is a flag -dM -E which will give details of all macros. We generally use this flag and specify the empty file in Windows NUL.

You can also get the more detailed information regarding ISO Standard Predefined Macros and some Additional Macros from the below link:

https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-iso-standard-predefined-...

https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-additional-predefined-ma...

All these resources will help you to find the Predefined Macros.

 

Warm Regards,

Abhishek

eldiener
New Contributor I
306 Views

Deshmukh, Abhishek (Intel) wrote:

Hi,

There is a flag -dM -E which will give details of all macros. We generally use this flag and specify the empty file in Windows NUL.

You can also get the more detailed information regarding ISO Standard Predefined Macros and some Additional Macros from the below link:

https://software.intel.com/en-us/cpp-compiler-developer-guide-and-refere...

https://software.intel.com/en-us/cpp-compiler-developer-guide-and-refere...

All these resources will help you to find the Predefined Macros.

 

Warm Regards,

Abhishek

icl -dM -E NUL
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.216 Build 20200306
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.
icl: command line warning #10006: ignoring unknown option '/dM'

NUL
#line 1 "NUL"

Your answer is not working for the Intel C++ Windows compiler.

AbhishekD_Intel
Moderator
306 Views

Hi,

We also got the same error with ICL and ICX compiler and we have reported it to the concerned team.

Thank you for your finding. Meanwhile, you can go through the links that I have provided for getting more information regarding predefined macros.

We will get back to you soon.

 

Warm Regards,

Abhishek

Viet_H_Intel
Moderator
306 Views

Have you tried icl /E test.c?

eldiener
New Contributor I
306 Views

Viet Hoang (Intel) wrote:

Have you tried icl /E test.c?

icl /E test.c
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.216 Build 20200306
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

test.c
Catastrophic error: cannot open source file "test.c"

Viet_H_Intel
Moderator
306 Views

I misunderstood that you wanted to see the macros of your program. You can icl /E /QdM  on a dummy testcase. 

Viet_H_Intel
Moderator
99 Views

Let us know if this is still an issue. Otherwise, we will close it.


Thanks,


Viet_H_Intel
Moderator
74 Views

We will no longer respond to this thread.  

If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.

Thanks,


Reply