[MacPorts] #59927: bison @3.5 does not build on PPC Tiger, Mac OS X 10.4.11, because "#pragma GCC diagnostic not allowed inside functions"

MacPorts noreply at macports.org
Wed Jan 8 17:50:50 UTC 2020


#59927: bison @3.5 does not build on PPC Tiger, Mac OS X 10.4.11, because "#pragma
GCC diagnostic not allowed inside functions"
------------------------+--------------------
  Reporter:  ballapete  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.6.2
Resolution:             |   Keywords:  tiger
      Port:  bison      |
------------------------+--------------------

Comment (by kencu):

 bison was broken by this thread and commit
 <https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html> and
 the test for GCC is not quite right yet.

 In `libuv` we use this.
 {{{
 #if defined(__GNUC__)
 #define GCC_VERSION \
         (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 #endif
 #if defined(__clang__) || (defined(GCC_VERSION) && (GCC_VERSION >= 40500))
 /* gcc diagnostic pragmas available */
 # define GCC_DIAGNOSTIC_AVAILABLE
 #endif
 }}}

 In `bison` in `src/system.h`:

 {{{
 /* See https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html.
 */
 # if defined __GNUC__ && ! defined __clang__ && ! defined __ICC &&
 __GNUC__ < 5
 #  define IGNORE_TYPE_LIMITS_BEGIN \
      _Pragma ("GCC diagnostic push") \
      _Pragma ("GCC diagnostic ignored \"-Wtype-limits\"")
 #  define IGNORE_TYPE_LIMITS_END \
      _Pragma ("GCC diagnostic pop")
 # else
 #  define IGNORE_TYPE_LIMITS_BEGIN
 #  define IGNORE_TYPE_LIMITS_END
 # endif
 }}}

 That block needs to be adjusted so that older gcc versions fall through to
 the no-ops.

-- 
Ticket URL: <https://trac.macports.org/ticket/59927#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list