Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

ifort preprocessor and variadic macros

Karanta__Antti
New Contributor I
1,608 Views

Hi!

I was wondering whether ifort's preprocessor supports variadic macros? (see e.g. http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html) If not, are there plans to add such beasts?

::Antti::

1 Solution
Steven_L_Intel1
Employee
1,608 Views
No, the Fortran preprocessor is very simple and does not support variadic macros, nor are there plans to add this.

View solution in original post

3 Replies
jimdempseyatthecove
Honored Contributor III
1,608 Views
You could experiment with shell piping gcc preprocessor in front of (or in place of) fpp.

In your development environment, insert in PATH, in front of other paths, a path to a GCChack folder containing a copy of the GCC preprocessor renamed to FPP.EXE. This assumes the GCC preprocessor can completely preprocess the source. This can also be a shell program youwrite that handles the shell call to GCC then to FPP.

Plan B is to create a batch file that first runs the GCC preprocessor, then runs the FPP preprocessor. Place the batch file into the "hack" folder under the name "FPP.EXE". Windows will (has for me) examine the contents of the start of the file and determine it is a batch file.

Plan C is to create pre-build events and actions to pre-pre-process the files using the GCC pre-processor.

Jim Dempsey
Steven_L_Intel1
Employee
1,609 Views
No, the Fortran preprocessor is very simple and does not support variadic macros, nor are there plans to add this.
Karanta__Antti
New Contributor I
1,608 Views

Thanks for the ideas, though I don't think I need the variadic macros so bad I'd be willing to complicate our build like this for them. There are a few things that would have been more convenient if they were available but no big issues.

0 Kudos
Reply