Edit build.lua for programs losing their private assert.h, so they depend on a list of .h files excluding assert.h. Remove modules/src/assert; it would be a dependency of cpp.ansi but we didn't build it, so cpp.ansi uses the libc assert. I hope that libc <assert.h> can better report failed assertions. Some old "assert.h" files didn't report the expression. Some reported a literal "x", because traditional C expanded the macro parameter x in "x", but ANSI C89 doesn't expand macro parameters in string literals.
		
			
				
	
	
		
			46 lines
		
	
	
	
		
			884 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
	
		
			884 B
		
	
	
	
		
			C
		
	
	
	
	
	
#ifndef NORCSID
 | 
						|
static char rcsid[] = "$Id$";
 | 
						|
#endif
 | 
						|
 | 
						|
#include <stdlib.h>
 | 
						|
#include <stdio.h>
 | 
						|
#include "param.h"
 | 
						|
#include "types.h"
 | 
						|
#include "tes.h"
 | 
						|
#include "lookup.h"
 | 
						|
#include "proinf.h"
 | 
						|
#include "optim.h"
 | 
						|
#include "ext.h"
 | 
						|
 | 
						|
/*
 | 
						|
 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
 | 
						|
 * See the copyright notice in the ACK home directory, in the file "Copyright".
 | 
						|
 *
 | 
						|
 * Author: Hans van Staveren
 | 
						|
 */
 | 
						|
 | 
						|
 | 
						|
/* VARARGS1 */
 | 
						|
error(s,a) char *s,*a; {
 | 
						|
 | 
						|
	fprintf(stderr,"%s: error on line %u",progname,linecount);
 | 
						|
	if (prodepth != 0)
 | 
						|
		fprintf(stderr,"(%.*s)",IDL,curpro.symbol->s_name);
 | 
						|
	fprintf(stderr,": ");
 | 
						|
	fprintf(stderr,s,a);
 | 
						|
	fprintf(stderr,"\n");
 | 
						|
#ifndef NDEBUG
 | 
						|
	abort();
 | 
						|
#endif
 | 
						|
	exit(-1);
 | 
						|
}
 | 
						|
 | 
						|
#ifdef DIAGOPT
 | 
						|
optim(n) {
 | 
						|
 | 
						|
	fprintf(stderr,"Made optimization %d",n);
 | 
						|
	if (prodepth)
 | 
						|
		fprintf(stderr," (%.*s)",IDL,curpro.symbol->s_name);
 | 
						|
	fprintf(stderr,"\n");
 | 
						|
}
 | 
						|
#endif
 |