This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Make 4 functions in the C++ frontend static
On 13 Feb, Mark Mitchell wrote:
> Volker Reichelt wrote:
>> The following patches make some more functions in the C++ frontend static.
>>
>> Bootstrapped and regtested on x86_64-unknown-linux-gnu.
>> Ok for mainline?
>
> Almost.
>
>> +static tree build_type_conversion (tree, tree);
>
> Please don't do that -- just put the "static" on the definition --
> unless there are calls to the function from before the definition-point.
Hmmm. With "grep build_type_conversion *.c" I get
cvt.c: else if converting class, pass off to build_type_conversion
cvt.c: rval = build_type_conversion (type, expr);
cvt.c: = build_type_conversion (reftype, expr);
cvt.c: rval = build_type_conversion (type, e);
cvt.c: ret_val = build_type_conversion (type, e);
cvt.c: rval = build_type_conversion (type, e);
cvt.c:build_type_conversion (tree xtype, tree expr)
Looks like a forward declaration is really needed here.
> So, please check each patch to make sure that the forward declaration
> is actually necessary.
That's what I did (modulo possible screw-ups). But I just double-checked
that only warn_hidden doesn't need a forward declaration.
Ok then?
Regards,
Volker