[4610] in Athena Bugs
vax 6.4R: /lib/cpp
daemon@ATHENA.MIT.EDU (John T Kohl)
Fri Mar 23 16:29:05 1990
Date: Fri, 23 Mar 90 16:28:54 -0500
From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
System name: lycus
Type and version: CVAXSTAR 6.4R
Display type: SM
What were you trying to do?
eliminate duplicate #defines in some files.
What's wrong:
/lib/cpp doesn't complain if you define the same token to the
same value more than once.
[{1}lycus:/afs/athena.mit.edu/astaff/project/krb5/src/lib/krb]
% cat /tmp/foo.h
#define foo 1
#define foo 1
[{1}lycus:/afs/athena.mit.edu/astaff/project/krb5/src/lib/krb]
% /lib/cpp /tmp/foo.h
# 1 "/tmp/foo.h"
[{1}lycus:/afs/athena.mit.edu/astaff/project/krb5/src/lib/krb]
% cat /tmp/bar.h
#define foo 1
#define foo 2
[{1}lycus:/afs/athena.mit.edu/astaff/project/krb5/src/lib/krb]
% /lib/cpp /tmp/bar.h
# 1 "/tmp/bar.h"
/tmp/bar.h: 2: foo redefined
[{1}lycus:/afs/athena.mit.edu/astaff/project/krb5/src/lib/krb]
%
What should have happened:
It should have complained about the redefinition.
Please describe any relevant documentation references:
cc(1)