public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/40016]  New: regex_internal.h:185: error: integer overflow in preprocessor expression
@ 2009-05-04 13:58 happyarch at gmail dot com
  2009-05-04 13:59 ` [Bug c/40016] " happyarch at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: happyarch at gmail dot com @ 2009-05-04 13:58 UTC (permalink / raw)
  To: gcc-bugs

Hi, when i compiling gnu parted 1.8.8 with gcc 4.5.0, got error

include regex.i

TIA
=========================================================================
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99  -I.     -Os
-Werror -MT regex.lo -MD -MP -MF .deps/regex.Tpo -c -o regex.lo regex.c
 gcc -std=gnu99 -I. -Os -Werror -MT regex.lo -MD -MP -MF .deps/regex.Tpo -c
regex.c  -fPIC -DPIC -o .libs/regex.o
cc1: warnings being treated as errors
In file included from regex.c:58:
regex_internal.h:185: error: integer overflow in preprocessor expression
make[2]: *** [regex.lo] Error 1
make[2]: Leaving directory `/home/user/d/parted-1.8.8/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/user/d/parted-1.8.8/lib'
make: *** [all-recursive] Error 1
bash-4.0$ cc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr --libexecdir=/usr/lib
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-languages=c,c++ --disable-bootstrap
--disable-multilib
Thread model: posix
gcc version 4.5.0 20090503 (experimental) (GCC) 
bash-4.0$


-- 
           Summary: regex_internal.h:185: error: integer overflow in
                    preprocessor expression
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: happyarch at gmail dot com
 GCC build triplet: x86_64
  GCC host triplet: x86_64
GCC target triplet: x86_64


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/40016] regex_internal.h:185: error: integer overflow in preprocessor expression
  2009-05-04 13:58 [Bug c/40016] New: regex_internal.h:185: error: integer overflow in preprocessor expression happyarch at gmail dot com
@ 2009-05-04 13:59 ` happyarch at gmail dot com
  2009-05-04 14:23 ` rguenth at gcc dot gnu dot org
  2009-05-04 14:52 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: happyarch at gmail dot com @ 2009-05-04 13:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from happyarch at gmail dot com  2009-05-04 13:59 -------
Created an attachment (id=17795)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17795&action=view)
.i file


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/40016] regex_internal.h:185: error: integer overflow in preprocessor expression
  2009-05-04 13:58 [Bug c/40016] New: regex_internal.h:185: error: integer overflow in preprocessor expression happyarch at gmail dot com
  2009-05-04 13:59 ` [Bug c/40016] " happyarch at gmail dot com
@ 2009-05-04 14:23 ` rguenth at gcc dot gnu dot org
  2009-05-04 14:52 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-04 14:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-05-04 14:23 -------
Works for me.


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/40016] regex_internal.h:185: error: integer overflow in preprocessor expression
  2009-05-04 13:58 [Bug c/40016] New: regex_internal.h:185: error: integer overflow in preprocessor expression happyarch at gmail dot com
  2009-05-04 13:59 ` [Bug c/40016] " happyarch at gmail dot com
  2009-05-04 14:23 ` rguenth at gcc dot gnu dot org
@ 2009-05-04 14:52 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-04 14:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-05-04 14:52 -------
Not surprisingly when the error is during preprocessing.
regex.h parted ships (why?) is broken by the #elif changes, there is:
#if some_condition_that_is_true_on_sane_targets
...
#elif BITSET_WORD_MAX == (0xffffffff + 2) * 0xffffffff
/* Work around a bug in 64-bit PGC (before version 6.1-2), where the 
   preprocessor mishandles large unsigned values as if they were signed.  */
...
#endif

To make GCC happy about this at least the #elif should be changed into #else
#if ... #endif.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-04 14:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-04 13:58 [Bug c/40016] New: regex_internal.h:185: error: integer overflow in preprocessor expression happyarch at gmail dot com
2009-05-04 13:59 ` [Bug c/40016] " happyarch at gmail dot com
2009-05-04 14:23 ` rguenth at gcc dot gnu dot org
2009-05-04 14:52 ` jakub at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).