bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] fix incompatibilities of regex with gcc -ansi -pedantic


From: Paul Eggert
Subject: Re: [bug-gnulib] fix incompatibilities of regex with gcc -ansi -pedantic
Date: Mon, 27 Nov 2006 11:41:59 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

> How about this?

That sounds good, except I prefer using < to > due to Leibnitz's
design philosophy for notation (which I learned from Val Schorre); the
style is already being used earlier in the code when checking GCC
versions.  Also, when an expression crosses a line boundary I like
putting ( at the start of the first line and ) at the end of the last
one.

I installed this:

2006-11-27  Bruno Haible  <address@hidden>
            Paul Eggert  <address@hidden>

        * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.

*** lib/regex.h 27 Nov 2006 07:15:26 -0000      1.39
--- lib/regex.h 27 Nov 2006 19:36:47 -0000
***************
*** 639,651 ****
     sys/cdefs.h's definition of __restrict_arr, though, as it
     mishandles gcc -ansi -pedantic.  */
  #undef __restrict_arr
! #if (defined __GNUG__                         \
!      || (__STDC_VERSION__ < 199901L           \
!        && (__STRICT_ANSI__                    \
!            || (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)))))
! # define __restrict_arr
! #else
  # define __restrict_arr __restrict
  #endif
  
  /* POSIX compatibility.  */
--- 639,651 ----
     sys/cdefs.h's definition of __restrict_arr, though, as it
     mishandles gcc -ansi -pedantic.  */
  #undef __restrict_arr
! #if ((199901L <= __STDC_VERSION__                                     \
!       || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__))    \
!         && !__STRICT_ANSI__))                                         \
!      && !defined __GNUG__)
  # define __restrict_arr __restrict
+ #else
+ # define __restrict_arr
  #endif
  
  /* POSIX compatibility.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]