diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2019-02-14 23:33:29 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2019-02-14 23:33:29 +0200 |
commit | 66086032120c6cfca41e48a510c2389b887d559b (patch) | |
tree | d2f035d8f7f33b8b0f90911eeb12b4204955d513 /gcc/fortran/invoke.texi | |
parent | 2f2b8e4054f5b84594a9b113e409e73480f2ebdf (diff) | |
download | gcc-66086032120c6cfca41e48a510c2389b887d559b.zip gcc-66086032120c6cfca41e48a510c2389b887d559b.tar.gz gcc-66086032120c6cfca41e48a510c2389b887d559b.tar.bz2 |
PR 81552 Improve and document -flag-init-integer
Make the option handling code parse the -flag-init-integer value as a
C long type, allowing a larger range on systems where long is a larger
type than int. Document the behavior.
Regtested on x86_64-pc-linux-gnu, committed as obvious.
2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/81552
* gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
* options.c (gfc_handle_option): Use strtol instead of atoi.
* invoke.texi: Document -finit-integer behavior in more detail
From-SVN: r268906
Diffstat (limited to 'gcc/fortran/invoke.texi')
-rw-r--r-- | gcc/fortran/invoke.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 0e0c2bc..a5d8196 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -1779,6 +1779,11 @@ use @option{-finit-real=snan}; note, however, that compile-time optimizations may convert them into quiet NaN and that trapping needs to be enabled (e.g. via @option{-ffpe-trap}). +The @option{-finit-integer} option will parse the value into an +integer of type @code{INTEGER(kind=C_LONG)} on the host. Said value +is then assigned to the integer variables in the Fortran code, which +might result in wraparound if the value is too large for the kind. + Finally, note that enabling any of the @option{-finit-*} options will silence warnings that would have been emitted by @option{-Wuninitialized} for the affected local variables. |