This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Group static constructors and destructors in specific subsections, take 2
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>, Dave Korn <dave dot korn dot cygwin at gmail dot com>, Jack Howarth <howarth at bromo dot med dot uc dot edu>, Jan Hubicka <hubicka at ucw dot cz>, Ian Lance Taylor <iant at google dot com>, Richard Henderson <rth at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, iains at gcc dot gnu dot org, tglek at mozilla dot com
- Date: Fri, 12 Nov 2010 20:47:23 +0000
- Subject: Re: Group static constructors and destructors in specific subsections, take 2
- References: <20101110141501.GA9662@bromo.med.uc.edu> <mcrzkthw7np.fsf@google.com> <20101110145839.GA10008@bromo.med.uc.edu> <20101110152717.GB2722@kam.mff.cuni.cz> <20101110164351.GA10764@bromo.med.uc.edu> <20101110170412.GG20390@kam.mff.cuni.cz> <20101110174442.GA11157@bromo.med.uc.edu> <20101111185552.GC5731@gmx.de> <4CDC6864.7070903@gmail.com> <4CDC7AED.2080707@gmail.com> <20101112185211.GE20088@gmx.de>
On 12/11/2010 18:52, Ralf Wildenhues wrote:
> * Dave Korn wrote on Fri, Nov 12, 2010 at 12:23:25AM CET:
>> On 11/11/2010 22:04, Dave Korn wrote:
>>
>>>> If this entry should be there, then it should be a @deftypefnx one, and
>>>> without a preceding empty line.
>>> The change is coming from genhooks, autogenerated based on the addition to
>>> target.def. It appears that if you add a new hook in target.def, but don't
>>> add an @hook documentation paragraph in tm.texi.in to match, genhooks.c
>>> emits the @deftype{fn,var} start marker along with the function name and
>>> parameters, but then fails to enter this if clause in emit_documentation():
>>> ... which is where the end directive gets emitted. Genhooks should
>>> probably fail more gracefully, but I imagine it is an error to add a new
>>> hook to target.def without documenting it in tm.texi.in. (If this isn't
>>> attempting to enforce policy, then moving the final printf() outside the if
>>> condition should do the trick.)
>> Actually, it's deliberate:
>
> It doesn't matter if it's deliberate or not. A texinfo file must be
> well-formed. That means, each @deftypefn must end with @end deftypefn,
> without intervening @deftypefn lines. Between these two, there may be
> zero or more @deftypefnx lines.
Yes, and if the @hook hunk had not been missing from tm.texi.in, that is
exactly what genhooks would have output. But the @hook hunk was missing,
which is not allowed when the doc string is "". This is a simple case of
GIGO: the input to genhooks was invalid, and it ended up generating invalid
texinfo output as a result.
cheers,
DaveK
- References:
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2
- Re: Group static constructors and destructors in specific subsections, take 2