Related articles |
---|
Death by error checks. ianr@lsl.co.uk (1995-11-21) |
Death by error checks. dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-11-27) |
Re: Death by error checks. jgj@ssd.hcsc.com (1995-11-28) |
Re: Death by error checks. sethml@dice.ugcs.caltech.edu (1995-11-28) |
Re: Death by error checks. Terry_Madsen@mindlink.bc.ca (1995-11-30) |
Re: Death by error checks. cliffc@ami.sps.mot.com (1995-11-30) |
Re: Death by error checks. sethml@avarice.ugcs.caltech.edu (1995-12-09) |
[2 later articles] |
Newsgroups: | comp.compilers |
From: | ianr@lsl.co.uk ( Ian Ringrose) |
Keywords: | C, question |
Organization: | Compilers Central |
Date: | Tue, 21 Nov 1995 13:51:03 GMT |
I have a problem, a big one (over 1E6 lines of 'c'). The coding
standard says that all functions must return a status (of type int),
and must be called with code of the form:
status = f(....);
if (status != NORMAL)
{
/* stack error message include file name and line number */
return status;
}
The above checking code is in a macro, so can be changed, the method
of error checking can not be changed, we have too much code that
use it.
What I would like to do, is give the 'c' compiler a hint in the
macro, that the 'if' should be predicted not taken. Are there any
'c' compilers that let me give the hint. (We build on Unix systems
from Sun, Dec, IBM, and HP.)
Ian Ringrose
ianr@lsl.co.uk
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.