Project

General

Profile

Bug #308

gmxcpp does not support #elif

Added by Berk Hess over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

gmxcpp does not support #elif.
I think no other directives are missing,
but this should be checked with the cpp specifications.

History

#1 Updated by Martin Hoefling over 10 years ago

also - it would be good if gmxcpp either supports preprocessor directives with spaces:

  1. define

instead of

#define

or alternatively warn about these constructs.

#2 Updated by David van der Spoel about 10 years ago

I looked into both these feature requests. The inclusion of the elif would require code to move away from the simple stack algorithm, and hence complicate the source with the risk for new bugs. Since there is the simple workaround of having a additional (nested) #ifdef #endif pair, inclusion of elif does not seem justified.

The use of # XXX conditionals likewise would make the code harder to understand

Instead I have added a complete description of all options to the grompp -h output. Let's remember that the reason to have this in the code is to be able to run grompp on e.g. Crays, and other machines without compilers (even Linux cluster nodes often don't have it).

Also available in: Atom PDF