This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C only] PR4076 -Wunused doesn't warn about static function only called by itself


PING: http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01298.html

On 20/05/07, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
:ADDPATCH:

This is a version of a patch [1] just for the C front-end. The
original patch worked fine in C++ except for anonymous namespaces.
However, fixing that causes other problems that seem to have deeper
roots [2]. I called for help or to ignore the issue of anonymous
namespaces [3] more than one month ago. Being unsuccessful, I prefer
to at least commit the C bits, close the original PR and open a new PR
specifically for the C++ front-end.

Does this seem OK?

Bootstrapped and regression tested with --enable-languages=all on
i686-pc-linux-gnu

Cheers,

Manuel.

2007-05-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>

 PR c/4076
 * c-typeck.c (build_external_ref): Don't mark as used if called from itself.
 * calls.c (rtx_for_function_call): Likewise.

testsuite/
 * gcc.dg/Wunused-function.c: New.


[1] http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00171.html [2] http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01606.html [3] http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00118.html




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]