#! /bin/sh -e
# DP: Revert PR c++/29408.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#cd ${dir}gcc && autoconf2.59
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
2006-10-16 Mark Mitchell <mark@codesourcery.com>
PR c++/29408
* parser.c (cp_parser_using_declaration): Stop parsing when
something goes wrong with an access declaration.
Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c (Revision 117801)
+++ gcc/cp/parser.c (Revision 117802)
@@ -10586,6 +10586,12 @@
if (!qscope)
qscope = global_namespace;
+ if (access_declaration_p && cp_parser_error_occurred (parser))
+ /* Something has already gone wrong; there's no need to parse
+ further. Since an error has occurred, the return value of
+ cp_parser_parse_definitely will be false, as required. */
+ return cp_parser_parse_definitely (parser);
+
/* Parse the unqualified-id. */
identifier = cp_parser_unqualified_id (parser,
/*template_keyword_p=*/false,