X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/02b84d4bc77bd351754ac9a8ac7771a9a3e2336f..a9ec328054b628447830161535f4915f715f49cd:/src/Headers/llerror.h diff --git a/src/Headers/llerror.h b/src/Headers/llerror.h index cf21295..eb76ba9 100644 --- a/src/Headers/llerror.h +++ b/src/Headers/llerror.h @@ -1,5 +1,5 @@ /* -** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. +** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003. ** See ../LICENSE for license information. ** */ @@ -72,13 +72,13 @@ extern /*@noreturnwhenfalse@*/ void llassertfatal (/*@sef@*/ bool p_test); extern void llmsg (/*@only@*/ cstring p_s) /*@modifies g_warningstream@*/ ; -extern void lldiagmsg (/*@only@*/ cstring p_s) /*@modifies stderr@*/ ; +extern void lldiagmsg (/*@only@*/ cstring p_s) /*@modifies g_messagestream@*/ ; extern void llmsgplain (/*@only@*/ cstring p_s) /*@modifies g_warningstream@*/ ; extern void llhint (/*@only@*/ cstring p_s) /*@globals g_currentloc, g_warningstream;@*/ /*@modifies g_warningstream@*/ ; -extern /*@private@*/ /*@noreturn@*/ void +extern /*:private:*/ /*@noreturn@*/ void xllfatalbug (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) /*@globals g_currentloc@*/ /*@modifies g_errorstream@*/ ; @@ -90,7 +90,7 @@ extern /*@noreturn@*/ void llfatalbug (/*@only@*/ cstring p_s) # define llfatalbug(p_s) \ xllfatalbug (__FILE__, __LINE__, p_s) -extern /*@private@*/ bool xllgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, +extern /*:private:*/ bool xllgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, /*@only@*/ cstring p_s, fileloc p_fl) /*@modifies g_warningstream@*/ ; @@ -99,7 +99,7 @@ extern bool llgenerror (flagcode p_o, /*@only@*/ cstring p_s, fileloc p_fl) # define llgenerror(p_o, p_s, p_fl) \ xllgenerror (__FILE__, __LINE__, p_o, p_s, p_fl) -extern /*@private@*/ bool +extern /*:private:*/ bool xllgenhinterror (char *p_srcFile, int p_srcLine, flagcode p_o, /*@only@*/ cstring p_s, /*@only@*/ cstring p_hint, fileloc p_fl) @@ -121,18 +121,35 @@ extern void llerror (flagcode p_o, /*@only@*/ cstring p_s) extern void llgenmsg (/*@only@*/ cstring p_s, fileloc p_fl) /*@modifies g_warningstream@*/ ; +extern /*@noreturn@*/ /*:private:*/ +void xllfatalerror (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) + /*@modifies g_errorstream@*/ ; + extern /*@noreturn@*/ void llfatalerror (/*@only@*/ cstring p_s) /*@modifies g_errorstream@*/ ; +# define llfatalerror(p_s) xllfatalerror (__FILE__, __LINE__, p_s) + +extern /*@noreturn@*/ /*:private:*/ void +xllfatalerrorLoc (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) + /*@globals g_currentloc@*/ + /*@modifies g_errorstream@*/ ; extern /*@noreturn@*/ void llfatalerrorLoc (/*@only@*/ cstring p_s) /*@globals g_currentloc@*/ /*@modifies g_errorstream@*/ ; +# define llfatalerrorLoc(p_s) xllfatalerrorLoc (__FILE__, __LINE__, p_s) + +extern /*:private:*/ void + xllparseerror (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s) + /*@globals g_currentloc@*/ + /*@modifies g_warningstream@*/ ; extern void llparseerror (/*@only@*/ cstring p_s) - /*@globals g_errorstream, g_currentloc@*/ - /*@modifies g_errorstream@*/ ; + /*@globals g_currentloc@*/ + /*@modifies g_warningstream@*/ ; + +# define llparseerror(p_s) xllparseerror (__FILE__, __LINE__, p_s) -# ifndef NOLCL extern /*@noreturn@*/ void lclplainfatalerror (/*@only@*/ cstring p_msg) /*@modifies g_warningstream@*/ ; extern /*@noreturn@*/ void lclfatalbug (/*@temp@*/ char *p_msg) /*@modifies g_warningstream@*/ ; extern int lclNumberErrors (void) /*@*/ ; @@ -149,7 +166,6 @@ extern void lclbug (/*@only@*/ cstring p_s); extern void lclplainerror (/*@only@*/ cstring p_msg); extern bool lclHadError (void); extern void lclRedeclarationError (ltoken p_id); -# endif extern void llerror_flagWarning (/*@only@*/ cstring p_s) /*@modifies g_warningstream@*/ ; @@ -218,7 +234,7 @@ optgenerror2n (flagcode p_f1, flagcode p_f2, /*@only@*/ cstring p_s, fileloc p_l # define optgenerror2n(p_f1, p_f2, p_s, p_loc) \ (xoptgenerror2n (__FILE__, __LINE__, p_f1, p_f2, p_s, p_loc)) -extern /*@private@*/ bool xlloptgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) +extern /*:private:*/ bool xlloptgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) /*@modifies *g_warningstream, internalState@*/ ; extern bool lloptgenerror (flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) @@ -235,7 +251,7 @@ extern bool llnoptgenerror (flagcode p_o, /*@only@*/ cstring p_s, fileloc p_loc) # define llnoptgenerror(p_o, p_s, p_loc) \ (xllnoptgenerror (__FILE__, __LINE__, p_o, p_s, p_loc)) -extern /*@private@*/ bool +extern /*:private:*/ bool xllgenformattypeerror (char *p_srcFile, int p_srcLine, ctype p_t1, exprNode p_e1, ctype p_t2, exprNode p_e2, @@ -301,7 +317,7 @@ extern void /*@modifies *g_warningstream, internalState@*/ ; #define voptgenerror(o, s, loc) ((void) optgenerror(o,s,loc)) -extern /*@private@*/ bool +extern /*:private:*/ bool xfsgenerror (char *p_srcFile, int p_srcLine, flagSpec p_fs, /*@only@*/ cstring p_s, fileloc p_fl) /*@modifies g_warningstream, internalState@*/ ; @@ -357,7 +373,7 @@ extern void ((void) llgenhinterror(o, s, h, loc)) -extern /*@private@*/ bool /*@alt void@*/ xllforceerror (char *p_srcFile, int p_srcLine, flagcode p_code, /*@only@*/ cstring p_s, fileloc p_fl) +extern /*:private:*/ bool /*@alt void@*/ xllforceerror (char *p_srcFile, int p_srcLine, flagcode p_code, /*@only@*/ cstring p_s, fileloc p_fl) /*@modifies g_warningstream@*/ ; extern bool /*@alt void@*/ llforceerror (flagcode p_code, /*@only@*/ cstring p_s, fileloc p_fl) @@ -365,7 +381,7 @@ extern bool /*@alt void@*/ llforceerror (flagcode p_code, /*@only@*/ cstring p_s # define llforceerror(p_code, p_s, p_fl) \ (xllforceerror (__FILE__, __LINE__, p_code, p_s, p_fl)) -extern /*@private@*/ bool xcppoptgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, +extern /*:private:*/ bool xcppoptgenerror (char *p_srcFile, int p_srcLine, flagcode p_o, /*@only@*/ cstring p_s, cppReader *p_pfile) /*@modifies g_warningstream, p_pfile@*/ ; @@ -406,7 +422,6 @@ extern void llgenindentmsgnoloc (/*@only@*/ cstring p_s); extern /*@observer@*/ cstring lldecodeerror (int) /*@*/ ; -/*@i523@*/ /* ** should be static, but used in cpperror (which shouldn't exist) */