diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2017-11-22 21:19:13 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2017-11-22 21:19:13 +0200 |
commit | 5675291ddbc7c7bee1b4722f1358a276365c0ee5 (patch) | |
tree | d591cf873aa6b611276b396c56845bbd1e9af949 /libgfortran/runtime/minimal.c | |
parent | 90b415f686b16f9492cd9b11c4f5c3f3c937d5d9 (diff) | |
download | gcc-5675291ddbc7c7bee1b4722f1358a276365c0ee5.zip gcc-5675291ddbc7c7bee1b4722f1358a276365c0ee5.tar.gz gcc-5675291ddbc7c7bee1b4722f1358a276365c0ee5.tar.bz2 |
PR 83097 Use __BYTE_ORDER__ predefined macro instead of runtime check
By using the __BYTE_ORDER__ predefined macro we don't need the
determine_endianness function anymore.
Regtested on x86_64-pc-linux-gnu.
libgfortran/ChangeLog:
2017-11-22 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/83097
* io/inquire.c (inquire_via_unit): Use __BYTE_ORDER__ predefined
macro.
* io/open.c (st_open): Likewise.
* io/transfer.c (data_transfer_init): Likewise.
* io/write.c (btoa_big): Likewise.
(otoa_big): Likewise.
(ztoa_big): Likewise.
* libgfortran.h (big_endian): Remove variable.
(GFOR_POINTER_TO_L1): Use __BYTE_ORDER__ macro.
* runtime/main.c (determine_endianness): Remove function.
(init): Remove call to determine_endianness.
* runtime/minimal.c: Remove setting big_endian variable.
From-SVN: r255072
Diffstat (limited to 'libgfortran/runtime/minimal.c')
-rw-r--r-- | libgfortran/runtime/minimal.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libgfortran/runtime/minimal.c b/libgfortran/runtime/minimal.c index 2ef4f15..3c7eca1 100644 --- a/libgfortran/runtime/minimal.c +++ b/libgfortran/runtime/minimal.c @@ -40,13 +40,6 @@ stupid_function_name_for_static_linking (void) options_t options; -/* This will be 0 for little-endian - machines and 1 for big-endian machines. - - Currently minimal libgfortran only runs on little-endian devices - which don't support constructors so this is just a constant. */ -int big_endian = 0; - static int argc_save; static char **argv_save; |