Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdahl!uunet!bywater!scifi!ndla!platt From: platt@ndla.UUCP (Daniel E. Platt) Newsgroups: comp.lang.c Subject: Re: AT&T C compilers Summary: Several C Standards Keywords: C compiler,bug? Message-ID: <199@ndla.UUCP> Date: 26 Feb 89 04:04:04 GMT References: <569@marob.MASA.COM> Lines: 26 In article <569@marob.MASA.COM>, samperi@marob.MASA.COM (Dominick Samperi) writes: > The AT&T C compiler (from System V, Release 2?) chokes on a declaration > of the form: > > extern int bob(double (*)()) ; > > On the other hand, it is accepted by Microsoft C and other C compilers. > The AT&T C++ translator also chokes on this. Is this declaration > incorrect, or have I been bitten by a compiler bug? The declaration you made corresponds to the ANSI standard, where arguement type checking is legal. In the K&R standard, as well as in C++, type checking of this kind is NOT standard. You haven't found a bug, just a problem with the various standards that are now floating around. What you need to do is to declare extern int bob(); and you need to make sure that the type passed and received are the same (very sure, or it won't work!!!). Hope this helps! Dan Platt