MPS issue job001248

Title(source clarity) Badly named CHECK macros in config.h, check.h are confusing
Statusclosed
Prioritynice
Assigned userRichard Kistruck
OrganizationRavenbrook
DescriptionCHECK, CHECK_NONE, CheckNONE macros in config.h & check.h are badly named and confusing. "CHECK" is too short and general a string. "CHECK_NONE" means that checks-that-assert compile away to nothing, and the name should say that. "CheckNONE" is the check-level that skips all checks-that-assert. The last two should not sound similar.
There are also checks-that-do-not-assert, but are simply convenient boolean expressions: CHECKT, CHECKLVALUE, CHECKTYPE, CHECKFIELDAPPROX, CHECKFIELD. Why are these named beginning with "CHECK"?
AnalysisRHSK 2005-10-11
Looked at config.h & check.h. These macros are confusing: see job001157 for an example of real confusion they have caused.

RHSK 2006-12-13
See job000534 and job001545 -- more examples of real confusion caused.

Tidy up all the important names, and add explanatory comments in check.h. Source-only change: no change to function yet. (See job001545).

I would like to change the name of test-only CHECKLVALUE, CHECKTYPE, CHECKT, etc, but it's too big for today.

And NOTREACHED should be AVER_NOTREACHED -- again, too big for today.
How foundinspection
Evidenceconfig.h#14 & check.h#10
Observed in1.105.0
Created byRichard Kistruck
Created on2005-10-11 11:14:30
Last modified byRichard Kistruck
Last modified on2006-12-13 19:11:54
History2005-10-11 RHSK created; defect found during analysis of job001157.
2006-12-13 RHSK note confusion caused to job000534 and job001545

Fixes

Change Effect Date User Description
161210 closed 2006-12-13 14:45:49 Richard Kistruck MPS sort out baroque CHECK macros (mainly config.h and check.h)
See job001248. Should be source-only change. Details:

  CheckNONE,SHALLOW,DEEP -->> CheckLevelMINIMAL,SHALLOW,DEEP
  [PROD_]CHECK_DEFAULT -->> [PROD_]CHECKLEVEL_INITIAL
  CHECK[_NONE] -->> AVER_AND_CHECK[_NONE]

And add some comments.