- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to build the Fortran Package Manager (fpm) using ifort instead of the default gfortran and encountered an error that indicates that the word "unix" (all lower case) is a predefined pre-processor macro in ifort 2021.7 (haven't tried ifx yet). In fpm "unix" is used in several places as a logical variable name. However, when I try to compile with ifort 2021.7 "unix" is replaced with a "1" (one) indicating that the preprocessor is replacing "unix" with "1". The easy fix is add -Uunix to the compile line but I don't think this should be necessary. So question: is this a bug or a feature.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bug definition :: One could look at it as a useful undocumented feature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or, a bug-like feature.
Doc (not an Intel employee or contractor)
[Maybe Windows 12 will be better]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More or less a feature - there are quite a few predefined preprocessor symbols, as documented at Predefined Preprocessor Symbols (intel.com)
While "linux" is listed, I don't see "unix" there. If "unix" is predefined, the documentation should say so. This is a general problem with preprocessing, however, when there are name clashes. Most of the names have leading underscores, but I know it was a popular convention in the past for compilers to define some of these names as undecorated lowercase.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem with unix is the borrowing of names from LISP and then the continued use of the arcane command names, which continues to this day.
From LISP examples, car() contents of the address register, and cdr() contents of the decrement register, I mean LISP was invented soon after eniac, but unix was not.
At least I can read a LISP file if it is written by someone who uses good descriptors, but C is a nightmare to read.
Give me a Fortran map.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page