unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Xue Fuqiao <xfq.free@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>, 13448-done@debbugs.gnu.org
Subject: bug#13448: Cannot build Emacs 24.2.92
Date: Tue, 15 Jan 2013 13:30:21 -0800	[thread overview]
Message-ID: <50F5CA6D.8040901@cs.ucla.edu> (raw)
In-Reply-To: <50F5BEBA.2070802@cs.ucla.edu>

Enabling link time optimization is a common enough need and
there's a simple fix that I think makes Emacs a bit clearer,
so I pushed the following patch to the trunk as bzr 111533
and I'm marking this as done.

The original problem feels like it might be a GCC problem --
GCC shouldn't be dumber (and presumably generate worse code)
merely because link-time optimization is enabled.  Do you
have the time to file a GCC bug report?

=== modified file 'lib-src/ChangeLog'
--- lib-src/ChangeLog	2013-01-02 16:13:04 +0000
+++ lib-src/ChangeLog	2013-01-15 21:24:53 +0000
@@ -1,3 +1,9 @@
+2013-01-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* make-docfile.c (write_globals): Make it a bit clearer (Bug#13448).
+	This pacifies GCC 4.7.2 when Emacs is configured with
+	--enable-link-time-optimization and --enable-gcc-warnings.
+
 2013-01-01  Juanma Barranquero  <lekktu@gmail.com>
 
 	* makefile.w32-in (lisp1): Add macroexp.elc (bug#13320).

=== modified file 'lib-src/make-docfile.c'
--- lib-src/make-docfile.c	2013-01-01 09:11:05 +0000
+++ lib-src/make-docfile.c	2013-01-15 21:23:34 +0000
@@ -624,7 +624,7 @@
   qsort (globals, num_globals, sizeof (struct global), compare_globals);
   for (i = 0; i < num_globals; ++i)
     {
-      char const *type;
+      char const *type = 0;
 
       switch (globals[i].type)
 	{
@@ -649,7 +649,7 @@
 	  fatal ("not a recognized DEFVAR_", 0);
 	}
 
-      if (globals[i].type != FUNCTION)
+      if (type)
 	{
 	  fprintf (outfile, "  %s f_%s;\n", type, globals[i].name);
 	  fprintf (outfile, "#define %s globals.f_%s\n",






  parent reply	other threads:[~2013-01-15 21:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  9:59 bug#13448: Cannot build Emacs 24.2.92 Xue Fuqiao
2013-01-15 16:15 ` Eli Zaretskii
2013-01-16  0:05   ` Xue Fuqiao
2013-01-15 17:23 ` Glenn Morris
2013-01-16  0:32   ` Xue Fuqiao
2013-01-15 18:48 ` Andreas Schwab
2013-01-15 19:08   ` Glenn Morris
2013-01-15 19:36     ` Glenn Morris
2013-01-15 20:40       ` Paul Eggert
     [not found]       ` <50F5BEBA.2070802@cs.ucla.edu>
2013-01-15 21:30         ` Paul Eggert [this message]
2013-01-16  1:02         ` Glenn Morris
2013-01-16  2:18           ` Paul Eggert
2013-01-16  2:26             ` Glenn Morris
2013-01-16  6:05               ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F5CA6D.8040901@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=13448-done@debbugs.gnu.org \
    --cc=schwab@linux-m68k.org \
    --cc=xfq.free@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).