This is the mail archive of the gcc@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]

error_mark_node


Hi,
what's the canonical way to deal with error_mark_node? Currently
there are some routines which ICE if given an error_mark, and
therefore force their callers to check.
	t = frob (t)
	if (t != error_mark_node)
	{
		t = futz (t);
		...
	}

Other routines accept an error_mark and return it immediately. This
allows the callers to forget about it.
	t = frob (t);
	t = futz (t);
	...


Which way should we standardize on? My vote is for the latter
treatment -- accept an error mark, and return it (or otherwise
NOP).

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

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