diff options
author | Richard Stallman <rms@gnu.org> | 1993-05-21 19:31:40 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-05-21 19:31:40 +0000 |
commit | 14aadfe88aaf1d1ae214c6c3bf3e39e50d4a2503 (patch) | |
tree | 6b6570751df3a26a805314d9e9f4ba49051becb7 /gcc | |
parent | 8fc5db4e10b8b8519cd5af73d2692ff92e82ed94 (diff) | |
download | gcc-14aadfe88aaf1d1ae214c6c3bf3e39e50d4a2503.zip gcc-14aadfe88aaf1d1ae214c6c3bf3e39e50d4a2503.tar.gz gcc-14aadfe88aaf1d1ae214c6c3bf3e39e50d4a2503.tar.bz2 |
(constant_expression_warning)
(overflow_warning, convert_and_check): Change pedwarn to warning.
From-SVN: r4529
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-common.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index ec5f8ad..b36a6ac 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -347,7 +347,11 @@ constant_expression_warning (value) { if (TREE_CODE (value) == INTEGER_CST && TREE_CONSTANT_OVERFLOW (value)) { - pedwarn ("overflow in constant expression"); + /* ??? This is a warning, not a pedwarn, in 2.4, + because it happens in contexts that are not + "constant expressions" in ANSI C. + Fix the problem differently in 2.5. */ + warning ("overflow in constant expression"); /* Suppress duplicate warnings. */ TREE_CONSTANT_OVERFLOW (value) = 0; } @@ -366,7 +370,11 @@ overflow_warning (value) { if (TREE_CODE (value) == INTEGER_CST && TREE_CONSTANT_OVERFLOW (value)) { - pedwarn ("integer overflow in expression"); + /* ??? This is a warning, not a pedwarn, in 2.4, + because it happens in contexts that are not + "constant expressions" in ANSI C. + Fix the problem differently in 2.5. */ + warning ("integer overflow in expression"); TREE_CONSTANT_OVERFLOW (value) = 0; } } @@ -412,7 +420,11 @@ convert_and_check (type, expr) TREE_CONSTANT_OVERFLOW (t) = 0; else if (TREE_CONSTANT_OVERFLOW (t)) { - pedwarn ("overflow in implicit constant conversion"); + /* ??? This is a warning, not a pedwarn, in 2.4, + because it happens in contexts that are not + "constant expressions" in ANSI C. + Fix the problem differently in 2.5. */ + warning ("overflow in implicit constant conversion"); TREE_CONSTANT_OVERFLOW (t) = 0; } else |