[PATCH]: use mathfn_built_in more often

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sun Apr 18 18:07:00 GMT 2004


 > From: Graham Stott <graham.stott@btinternet.com>
 > 
 > Hi Kaveh,
 > 
 > There is a warning regression :-( with this patch because the fndecl
 > argument to fold_builtin_cabs is no longer used after your patch.
 > 
 > Uhm I thought these nits were picked up with our use of warnings
 > as errors during stage2 and stage3 builds in bootstraps.
 > 
 > Something's wrong somewhere I see the warning during stage1 build
 > but don't during either stage2 or stage3. That'll explain why the
 > bootstrap didn't abort.

Interesting, good catch.  There appears to be a regression on mainline
in the code to diagnose these cases.  Here's a reduced testcase,
compile with mainline using -O1 -funit-at-a-time -W -Wunused foo.c:

extern void baz(void);
static void bar(int i)  /* <<--- should get an "unused" warning here! */
{
  baz();
}

void foo(void)
{
  bar(20);
}

Since you noticed it, would you like to file the bug report?

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-patches mailing list