[46] in Athena Bugs

home help back first fref pref prev next nref lref last post

HC bug.

daemon@ATHENA.MIT.EDU (Bill Sommerfeld)
Wed Mar 16 03:13:32 1988

Date: Wed, 16 Mar 88 03:12:38 EST
From: Bill Sommerfeld <wesommer@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU, rt-testers@ATHENA.MIT.EDU
`$' is silently treated as a comment-start character by High C; that
is, each line which contains a `$' sign is silently truncated to end
before the dollar sign.

This source file:
----8<------cut here--------8<-----
foo_$bar  this is a comment which is ignored by high c
()
{
}
----8<------cut here--------8<-----
causes the compiler to define the function foo_ as one which does nothing.

`$' in identifiers is not legal according to the ANSI spec; however,
it has `traditionally' been accepted by PCC-based compilers, as well
as the VMS and Apollo C compilers (since their systems programming
environment requires it).

hc should at least report an error message rather than failing
silently.  Ideally, there should also be an option (perhaps disabled
by default) which would allow the non-standard use of '$' in
identifiers.  I don't remember seeing such an option documented
anywhere.

Apollo uses CLU-ish or multics-ish identifier naming conventions.
This wonderful glitch implies that we can't use apollo's ncs on the RT
without either using pcc instead of hc, or running all the source code
through some sort of a filter before compiling it.

					- Bill

home help back first fref pref prev next nref lref last post