Skip to content

Problems with Pre-Processor Directives #18

Open
@kthoe

Description

@kthoe

Some compilers (e.g. GCC 9) don't much like the preprocessor directives, and other compilers (e.g. Intel ifort 18) are only conditionally fine.

There are two issues:

  1. #ifdef REAL32; fparser_rk = real32 This could be fragile if the preprocessor is case insensitive (i.e. fparser_rk = REAL32 instead), which might lead to "recursion detected" compilation errors. It might be better to use something along the lines of #ifdef SINGLE or #ifdef PARSER_32 instead.
  2. #ifdef REAL32; #elif REAL64 is fragile. Some compilers are conditionally fine if REAL32 has a value (e.g. #define REAL32 REAL32 instead of just #define REAL32). Other compilers don't really like that structure at all. It'd be more broadly compatible to do something like #if defined(REAL32); #elif defined(REAL64) instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions