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: [PATCH] doc fix for c/71560 - union compound literal initializes wrong union field


Ping.  The updated patch at the link below corrects the issues
with the tags pointed out by Sandra in her review.

https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00350.html

Thanks
Martin

On 07/07/2016 01:47 PM, Martin Sebor wrote:
On 07/03/2016 05:22 PM, Sandra Loosemore wrote:
On 07/01/2016 05:56 PM, Martin Sebor wrote:
The bug points out a couple of conformance problems in the GCC
manual where is discusses compound literals and casts to unions
and says that a compound literal is equivalent to a cast.  It
isn't because a compound literal is an lvalue but a cast yields
an rvalue.

The attached patch corrects this error and adds some clarifying
text to illustrate the differences.

This looks OK modulo some markup problems.

Thanks for the careful review!  After reading the descriptions
in the Texinfo manual I agree that the @code command is more
appropriate here than either @var or @samp and I've made the
changes in the updated patch.

I quickly reviewed the rest of the file for other uses of these
commands and they appear to be just as inconsistent with the
Texinfo recommendation as were mine.  They don't appear to make
a huge difference in the formatting of the HTML or PDF but it
would be nice to fix those up as well, if only for consistency.

I think it would be more appropriate to use @code rather than @samp
markup throughout this discussion, since foo, char*, etc are "entire
syntactic tokens", per the texinfo manual.

Attached is the updated patch.

Martin


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