public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/108175] New: Target macros missing in gfortran with -cpp (C preprocessor)
@ 2022-12-19 10:45 burnus at gcc dot gnu.org
  2022-12-19 11:54 ` [Bug fortran/108175] " jakub at gcc dot gnu.org
  2022-12-19 14:36 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-12-19 10:45 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/108175] Target macros missing in gfortran with -cpp (C preprocessor)
  2022-12-19 10:45 [Bug fortran/108175] New: Target macros missing in gfortran with -cpp (C preprocessor) burnus at gcc dot gnu.org
@ 2022-12-19 11:54 ` jakub at gcc dot gnu.org
  2022-12-19 14:36 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-12-19 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
fortran/cpp.cc (cpp_define_builtins) has this commented out:
  /* FIXME: Pandora's Box
    Using the macros below results in multiple breakages:
     - mingw will fail to compile this file as dependent macros
       assume to be used in c-cppbuiltin.cc only. Further, they use
       flags only valid/defined in C (same as noted above).
       [config/i386/mingw32.h, config/i386/cygming.h]
     - other platforms (not as popular) break similarly
       [grep for 'builtin_define_with_int_value' in gcc/config/]

  TARGET_CPU_CPP_BUILTINS ();
  TARGET_OS_CPP_BUILTINS ();
  TARGET_OBJFMT_CPP_BUILTINS (); */
See r0-87639-g3c2a68b3a308d07c

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/108175] Target macros missing in gfortran with -cpp (C preprocessor)
  2022-12-19 10:45 [Bug fortran/108175] New: Target macros missing in gfortran with -cpp (C preprocessor) burnus at gcc dot gnu.org
  2022-12-19 11:54 ` [Bug fortran/108175] " jakub at gcc dot gnu.org
@ 2022-12-19 14:36 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-19 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 42954

*** This bug has been marked as a duplicate of bug 42954 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-19 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 10:45 [Bug fortran/108175] New: Target macros missing in gfortran with -cpp (C preprocessor) burnus at gcc dot gnu.org
2022-12-19 11:54 ` [Bug fortran/108175] " jakub at gcc dot gnu.org
2022-12-19 14:36 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).