This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/24599] [4.0/4.1 regression] Overflow for true value



------- Comment #6 from pinskia at gcc dot gnu dot org  2005-11-04 15:28 -------
Here is a testcase which is better representive of the issue (compile with
-std=c99 -pedantic-errors):
#include <stdbool.h>

int
main (int argc, char **argv)
{
  if ((bool)((1527719483 + 1477819644))) {
  }

  return 0;
}

bool t1 = true;
--------------
t.c: In function ?main?:
t.c:6: warning: integer overflow in expression
t.c: At top level:
t.c:12: error: overflow in constant expression


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |c
           Keywords|                            |diagnostic, rejects-valid
      Known to fail|4.0.3                       |4.0.3 4.1.0
      Known to work|4.1.0 3.4.0                 |3.4.0
            Summary|[4.0 regression] segv after |[4.0/4.1 regression]
                   |overflow detection          |Overflow for true value


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24599


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]