https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108175

            Bug ID: 108175
           Summary: Target macros missing in gfortran with -cpp (C
                    preprocessor)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Compare

  touch foo.c; gcc -E -cpp -dM foo.c
  foo.F90; gfortran -E -cpp -dM foo.F90

And note that in the C case, there are several target macros defined, e.g. on
my system:

__amd64, __amd64__, __ELF__, __linux, __linux__, linux, __unix, __unix__, unix
__x86_64, __x86_64__

EXPECTED: Those are also available with gfortran – as they are very useful to
generate some conditional code, especially for systems like Windows or embedded
systems where certains things don't work or work differently.

Reply via email to