Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!gill!paul From: paul@gill.UUCP (Paul Nordstrom) Newsgroups: comp.lang.c++ Subject: Re: Automatic variables of type pointer to function? Summary: ... and on Oregon c++ Message-ID: <617@gill.UUCP> Date: 21 Aug 89 16:22:24 GMT References: <1117@isaak.UUCP> <1520001@hpmwjaa.HP.COM> Organization: Gill & Co., L.P., San Francisco, CA Lines: 38 In article <1520001@hpmwjaa.HP.COM>, jeffa@hpmwtd.HP.COM (Jeff Aguilera) writes: > > . . several function definitions . > > > > int (*auto_explicit)() = &func; // error > > > > Although all of the above declarations with initializations seem to > > be valid, both AT&T cfront 1.2 and g++ 1.35.0 complain about the > > last declaration: > > > > cfront: error: auto_explicit is undefined > > g++: `auto_explicit' was not declared > > > > What's wrong about the above code? What am I missing? > > Or are the compliers the ones to blame? > > Jochen Schwarze, ISA GmbH, Stuttgart, West Germany > > Works fine on my HP/350 using AT&T C++ 2.0. The regular HP-UX cc compiler > complains about "& before array or function". Also works fine on my Sun 3/60 with Oregon C++ ver 1.2Ag. Since the original code did not include any executable code, I didn't test to see if the code generated was or was not correct. Paul Nordstrom Gill & Co., L.P. uunet!gill!paul -- Paul Nordstrom Gill & Co., L.P. uunet!gill!paul