Prototypes for macros?
Evan Manning
gleeper at tybalt.caltech.edu
Fri May 4 06:24:03 AEST 1990
I ran into an interesting situation yesterday playing with my brand
new Turbo C 2.0. I was trying to use it with all warnings and errors
enabled, as I'd heard it claimed that this obviated all need for lint
(At my previous job I got quite attached to PC-Lint from Gimpel but now
it's my money so I thought I'd at least give Turbo a chance.)
The problem emerged when I tried to use some functions (randomize &
random) which are defined as macros in the headers. TC gave me a
'no prototype in scope' warning and then some other error message I
don't recall when I disabled the prototype warning. All problems
vanished when I slavishly copied the definitions of the macros from
the header.
Is it a bug? Should macros have prototypes too? Will I have to worry
about putchar et al?
-- Evan
***************************************************************************
Your eyes are weary from staring at the CRT for so | Evan M. Manning
long. You feel sleepy. Notice how restful it is | is
to watch the cursor blink. Close your eyes. The | gleeper at tybalt.caltech.edu
opinions stated above are yours. You cannot | manning at mars.jpl.nasa.gov
imagine why you ever felt otherwise. |
More information about the Comp.lang.c
mailing list