[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, new
From: |
Mike Frysinger |
Subject: |
Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop - FIX NEEDS TESTING |
Date: |
Thu, 8 Oct 2015 00:39:51 -0400 |
On 07 Oct 2015 18:46, Michael Petch wrote:
> I have put away a fix for this issue and did some other cleanup that
> involved files that may be using __attribute__. I took the approach of
> moving the __attribute__ check to configure.ac using
> ax_c___attribute__.m4 . common.h now includes config.h .
> This fix could use some testing, so please let me know if i have caused
> any regressions or something isn't fixed.
>
> The Changelog is here:
>
> 2015-10-07 Michael Petch <address@hidden>
>
> * common.h, configure.ac, copying.awk, credits.sh,
> output.h, lib/simd.h, m4/Makefile.am, non-src/copying.c,
> non-src/credits.c, non-src/gnubg-stock-pixbufs.h,
> +m4/ax_c___attribute__.m4, external_l.l, external_y.y,
> sgf_l.l, sgf_y.y, non-src/external_l.c, non-src/external_y.c,
> non-src/external_y.h, non-src/sgf_l.c, non-src/sgf_y.c,
> non-src/sgf_y.h, backgammon.h : Fix problem identified by
> Mike Frysinger where __attribute__ and _GNU_SOURCE may not
> be properly defined in some situations. This may result in
> an infinite loop on newer compilers.
my (additional) 2 cents (after reading some of the other notes posted):
redefining __attribute__ is generally dangerous and i'm not sure trying
to mitigate it is worth the effort. the way other projects do it seems
much safer to me -- namely, creating your own FOO_ATTRIBUTE(xxx) macro
which in turn would expand into __attribute__ or nothing. that way even
if the configure or header test goes wrong, you won't inadvertently break
system headers ... only your own :).
-mike
signature.asc
Description: Digital signature
- [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop, Mike Frysinger, 2015/10/08
- Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop, Russ Allbery, 2015/10/08
- Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop, Michael Petch, 2015/10/08
- Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop, Russ Allbery, 2015/10/08
- Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop, Philippe Michel, 2015/10/08
- Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop, Michael Petch, 2015/10/08
- Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop - FIX NEEDS TESTING, Michael Petch, 2015/10/08
- Re: [Bug-gnubg] bad __attribute__ handling breaks w/newer standards, newer gcc, & glibc and causes infinite loop - FIX NEEDS TESTING,
Mike Frysinger <=