This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
error_mark_node
- To: gcc at gcc dot gnu dot org
- Subject: error_mark_node
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Wed, 01 Nov 2000 14:14:25 +0000
- Organization: Codesourcery LLC
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