assert() problem

Joel M. Miller jmm at skivs.UUCP
Sun Nov 25 13:19:01 AEST 1990


In compiling about 20,000 lines of C and Fortran code I originally wrote
for another Unix system, I was pleased to run into only one small problem,
which might be worth fixing, or at least documenting.  The A/UX implementation
of assert() as a macro makes it illegal to write things like:

	assert(fp = fopen(fname, "r"));

since the macro adds some double quotes of its own, which then pair up
incorrectly with those around the "r".
-- 
Joel M Miller                    Internet: jmm at skivs.ski.org
Smith-Kettlewell Institute       Usenet:   fernwood!skivs!jmm
2232 Webster St                  Bitnet:   jmm%skivs.ski.org at fernwood.mpk.ca.us
San Francisco, CA 94115          Voice:    415/561-1703     Fax: 415/561-1610



More information about the Comp.unix.aux mailing list