From: Roland McGrath <roland@frob.com>
To: GNU libc hackers <libc-hacker@sources.redhat.com>
Subject: iconv/loop.c vs gcc-3.1: divide by zero in #if
Date: Thu, 16 May 2002 13:05:00 -0000 [thread overview]
Message-ID: <20020516200512.1633B1BA17@perdition.linnaean.org> (raw)
Using gcc-3.1 I get "divide by zero in #if" for several iconv modules
without the following change. Ok to put this in (with log entry, of course)?
Index: loop.c
===================================================================
RCS file: /cvs/glibc/libc/iconv/loop.c,v
retrieving revision 1.28
diff -u -p -r1.28 loop.c
--- loop.c 15 Jul 2001 15:18:22 -0000 1.28
+++ loop.c 16 May 2002 06:24:49 -0000
@@ -1,5 +1,5 @@
/* Conversion loop frame work.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998,99,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -296,17 +296,19 @@ FCTNAME (LOOPFCT) (struct __gconv_step *
/* Include the file a second time to define the function to handle
unaligned access. */
#if !defined DEFINE_UNALIGNED && !defined _STRING_ARCH_unaligned \
- && MIN_NEEDED_FROM != 1 && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0 \
- && MIN_NEEDED_TO != 1 && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
-# undef get16
-# undef get32
-# undef put16
-# undef put32
-# undef unaligned
-
-# define DEFINE_UNALIGNED
-# include "loop.c"
-# undef DEFINE_UNALIGNED
+ && MIN_NEEDED_FROM > 1 && MIN_NEEDED_TO > 1
+# if MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0 \
+# && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
+# undef get16
+# undef get32
+# undef put16
+# undef put32
+# undef unaligned
+
+# define DEFINE_UNALIGNED
+# include "loop.c"
+# undef DEFINE_UNALIGNED
+# endif
#endif
next reply other threads:[~2002-05-16 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-16 13:05 Roland McGrath [this message]
2002-05-19 10:03 ` Andreas Jaeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020516200512.1633B1BA17@perdition.linnaean.org \
--to=roland@frob.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).