Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!charyb!dan From: dan@kfw.COM (Dan Mick) Newsgroups: comp.lang.c Subject: Re: Prototypes for macros? Message-ID: <1990May4.033226.630@kfw.COM> Date: 4 May 90 03:32:26 GMT References: <1990May3.202403.10140@laguna.ccsf.caltech.edu> Reply-To: dan@kfw.com (Dan Mick) Distribution: comp Organization: KFW Corporation, Newbury Park, CA Lines: 22 In article <1990May3.202403.10140@laguna.ccsf.caltech.edu> gleeper@tybalt.caltech.edu (Evan Manning) writes: >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? Erm...if you had included the header, there wouldn't have been a warning, since, after it was preprocessed, there would be no "function" randomize() or random() to complain about. #include