Path: utzoo!yunexus!ists!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!rvl3.ecn.purdue.edu!lewie From: lewie@rvl3.ecn.purdue.edu (Jeff Lewis) Newsgroups: gnu.gcc.bug Subject: inlining bug... Message-ID: <8911161850.AA10976@rvl3.ecn.purdue.edu> Date: 16 Nov 89 18:50:18 GMT Article-I.D.: rvl3.8911161850.AA10976 Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 31 Machine: Sun4os4 Gcc: 1.36 In the following program, the 'inline' declaration appears to cause the type of the function to become lost. The second printf()'s output is bogus because dosqrt2()'s return value is interpreted as 'int'. #include static double dosqrt1(r) double r; { return sqrt(r); } static inline double dosqrt2(r) double r; { return sqrt(r); } main() { printf("%g\n", dosqrt1(2.0)); printf("%g\n", dosqrt2(2.0)); }