PR 34985 Warning "defined but not used" despite __attribute__((__used__))

Manuel López-Ibáñez lopezibanez@gmail.com
Thu Feb 28 02:33:00 GMT 2008


This patch fixes PR 34985. The problem here is that the USED flag was
not being copied from the old to the new decl when merging two decls.

Bootstrapped and regression tested on x86_64-unknown-linu-gnu.

OK to commit?

2008-02-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org

  PR34985
  * c-decl.c (merge_decls): Merge USED flags.
cp/
  * decl.c (duplicate_decls): Merge USED flags.
testsuite/
  * gcc.dg/pr34985.c: New.
  * g++.dg/warn/pr34985.C: New
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-pr34985.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080228/8376172d/attachment.ksh>


More information about the Gcc-patches mailing list