[AC 21.5] Fix build with g++

Jerry James <[email protected]> Thu, 6 Nov 2014 09:35:41 -0700
Newsgroups gmane.emacs.xemacs.patches
Message-ID <CAHCOHQk4bZTmY7G3Z72EScPmo9MLkcoyNYrcdGzzJswgSbPp9g@mail.gmail.com>
APPROVE COMMIT 21.5

On Wed, Nov 5, 2014 at 3:51 PM, Jerry James <[email protected]> wrote:
> This patch fixes a collection of miscellaneous problems that break the
> build with g++ 4.8.3.  Thanks to Mats for pointing out two of the
> problems.  I think the contents of this patch are fairly
> straightforward, with the exception of the changes to XSTRING_LENGTH
> and XSTRING_DATA.  Before I made those changes, g++ 4.8.3 complained
> about a possibly uninitialized anonymous value in both alloc.c and
> fileio.c.  I looked briefly at the code, thought it looked okay and
> that g++ must have lost its marbles, and continued on.  Then, after
> building temacs, it segfaulted while loading lisp, at the exact line
> in fileio.c where one of the warnings was issued.  More digging showed
> that g++ was creating anonymous temporaries, and not initializing
> them, instead of using the parameters that I thought it should access.
> Very weird.  I don't understand what is going on there.  It may be a
> bug in g++ 4.8.3, but on the other hand, those macros evaluate their
> arguments multiple times, which may have something to do with the
> problem.  Anyway, let me know if you object to this solution.

Given Mat's tacit approval on xemacs-beta, I have committed and pushed
this patch.  If anybody is unhappy about the XSTRING_LENGTH and
XSTRING_DATA change, let me know and we can explore other possible
solutions.
-- 
Jerry James
http://www.jamezone.org/