[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1.875: can't compile output with g++-2.95.3
From: |
Paul Eggert |
Subject: |
Re: 1.875: can't compile output with g++-2.95.3 |
Date: |
Thu, 9 Jan 2003 00:20:02 -0800 (PST) |
Thanks for your bug report. We've installed the following patches
and they should appear in the next Bison version.
2003-01-04 Paul Eggert <address@hidden>
* data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
since GNU C++ (as of 3.2.1) does not allow attributes on labels.
Problem reported by Nelson H. F. Beebe.
2003-01-02 Paul Eggert <address@hidden>
* data/yacc.c (yyerrlab1): Append `;' after attribute, to
pacify the buggy "smart preprocessor" in MacOS 10.2.3.
Bug reported by Nelson H. F. Beebe.
--- data/yacc.c 28 Dec 2002 08:36:02 -0000 1.47
+++ data/yacc.c 5 Jan 2003 00:48:16 -0000 1.50
@@ -1,7 +1,7 @@
m4_divert(-1) -*- C -*-
# Yacc compatible skeleton for Bison
-# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002
+# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -134,7 +134,7 @@ m4_changecom()
m4_divert(0)dnl
@output @output_parser_name@
b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
- [1984, 1989, 1990, 2000, 2001, 2002])[
+ [1984, 1989, 1990, 2000, 2001, 2002, 2003])[
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -1112,9 +1112,13 @@ yyerrlab:
yyerrlab1:
/* Suppress GCC warning that yyerrlab1 is unused when no action
- invokes YYERROR. */
+ invokes YYERROR. MacOS 10.2.3's buggy "smart preprocessor"
+ insists on the trailing semicolon. */
#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
- __attribute__ ((__unused__))
+ /* GNU C++ (as of version 3.2.1) does not allow attributes on labels. */
+# ifndef __cplusplus
+ __attribute__ ((__unused__));
+# endif
#endif
]b4_location_if([ yylerrsp = yylsp;
@@ -1204,7 +1208,7 @@ b4_epilogue
m4_if(b4_defines_flag, 0, [],
address@hidden @output_header_name@
b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
- [1984, 1989, 1990, 2000, 2001, 2002])
+ [1984, 1989, 1990, 2000, 2001, 2002, 2003])
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.