This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Use error_mark_node to indicate failure in parse_strconst_pragma in cp/lex.c


Volker Reichelt wrote:
> The function parse_strconst_pragma in lex.c returns "(tree)-1" to
> indicate failure. The patch changes the function and its callers
> to use error_mark_node instead.
> The patch also simplifies parse_strconst_pragma to get rid of a
> superfluous assignment.
> 
> Bootstrapped and regtested on x86_64-unknown-linux-gnu.
> Ok for mainline?

Would you please use diff -p to generate patches?

(I did this by adding:

diff-cmd = /home/mitchell/bin/svn-diff

to ~/.subversion/config, and then having "svn-diff" be:

#! /bin/sh
exec diff -p "$@")

> 2006-02-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
> 
> 	* lex.c (parse_strconst_pragma): Return error_mark_node instead of
> 	"(tree)-1" to indicate failure.  Simplify.
>         (handle_pragma_interface): Test for error_mark_node instead of
> 	"(tree)-1".
> 	(handle_pragma_implementation): Likewise.

This is a good cleanup; thanks.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]