On Mon, Jun 26, 2017 at 04:02:30PM +0200, Thomas Seeling wrote:
> > I started wondering about the purpose of this line:
> >     sed -i '233,237 s/max)/max \\/' lib/intprops.h
>
> it seems that the surrounding #define is 0 in your case so you don't
> encounter the bad macro definition. The sed introduces a syntax error,
> too, so it seems noone ever evaluated that. Of course you can't replace
> the closing parenthesis with a \\ to continue the line.
>
> The lines look like this:
>
> (the first one is #226 just to better show the context)
>
> /* True if __builtin_add_overflow (A, B, P) works when P is null.  */
> #define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__)
>
> You'd encounter the problem only when LFS moves to gcc >= version 7.
>
> # echo "__GNUC__" | gcc -I. -E -
> # 1 "<stdin>"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 31 "<command-line>"
> # 1 "/usr/include/stdc-predef.h" 1 3 4
> # 32 "<command-line>" 2
> # 1 "<stdin>"
> 6
>
>
> #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
> --> (the following line is # 233)
> # define _GL_ADD_OVERFLOW(a, b, min, max)
>    __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
> # define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
>    __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
> # define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
>    __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
> #else
>
> > I looked at lib/intprops.h and it didn't seem like there was a syntax error
> > there.

This is how these lines look for me, before running sed:

#####
227 /* The _GL*_OVERFLOW macros have the same restrictions as the
228    *_RANGE_OVERFLOW macros, except that they do not assume that operands
229    (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
230    that the result (e.g., A + B) has that type.  */
231 #if _GL_HAS_BUILTIN_OVERFLOW_P
232 # define _GL_ADD_OVERFLOW(a, b, min, max)                               \
233    __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
234 # define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                          \
235    __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
236 # define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                          \
237    __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
#####

The MD5 of diffutils-3.6.tar.xz is 07cf286672ced26fba54cd0313bdc071 - is that
correct for you?

-- Kuba
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to