Mercurial > hg > CbC > CbC_gcc
diff gcc/fortran/trans-const.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/gcc/fortran/trans-const.c Thu Oct 25 07:37:49 2018 +0900 +++ b/gcc/fortran/trans-const.c Thu Feb 13 11:34:05 2020 +0900 @@ -1,5 +1,5 @@ /* Translation of constants - Copyright (C) 2002-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2020 Free Software Foundation, Inc. Contributed by Paul Brook This file is part of GCC. @@ -25,6 +25,7 @@ #include "coretypes.h" #include "tree.h" #include "gfortran.h" +#include "options.h" #include "trans.h" #include "fold-const.h" #include "stor-layout.h" @@ -331,8 +332,9 @@ gfc_build_string_const (expr->representation.length, expr->representation.string)); if (!integer_zerop (tmp) && !integer_onep (tmp)) - gfc_warning (0, "Assigning value other than 0 or 1 to LOGICAL" - " has undefined result at %L", &expr->where); + gfc_warning (flag_dec_char_conversions ? OPT_Wsurprising : 0, + "Assigning value other than 0 or 1 to LOGICAL has " + "undefined result at %L", &expr->where); return fold_convert (gfc_get_logical_type (expr->ts.kind), tmp); } else