all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 27346@debbugs.gnu.org
Subject: bug#27346: module tests fail to compile with gcc 4.8.5
Date: Mon, 12 Jun 2017 16:28:55 -0400	[thread overview]
Message-ID: <1fvao16jco.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <83mv9d3vxw.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Jun 2017 21:25:15 +0300")

Eli Zaretskii wrote:

> I think the "if defined __has_attribute &&" part is not needed, since
> conf_post.h defines it fr compilers that lack it.  Can you try that?

emacs-module.h does not include config.h, and I don't know if it should.
(I see no src/*.h file includes config.h, except cygw32.h.
Should it? It could easily be changed not to.)

If not, then I guess something like the following is needed:

--- a/src/emacs-module.h
+++ b/src/emacs-module.h
@@ -35,9 +35,12 @@
 # define EMACS_NOEXCEPT
 #endif
 
-#if defined __has_attribute && __has_attribute(__nonnull__)
+#ifdef __has_attribute
+#if __has_attribute(__nonnull__)
 # define EMACS_ATTRIBUTE_NONNULL(...)
 __attribute__((__nonnull__(__VA_ARGS__)))
-#else
+#endif
+#endif
+#ifndef EMACS_ATTRIBUTE_NONNULL
 # define EMACS_ATTRIBUTE_NONNULL(...)
 #endif


(Even with this change or your suggestion, I then get "Module initialization
failed" when running the tests, but that's probably a different issue.)






  reply	other threads:[~2017-06-12 20:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 17:37 bug#27346: module tests fail to compile with gcc 4.8.5 Glenn Morris
2017-06-12 18:25 ` Eli Zaretskii
2017-06-12 20:28   ` Glenn Morris [this message]
2017-06-12 21:33     ` Philipp Stephani
2017-06-12 21:46       ` Glenn Morris
2017-06-12 22:00         ` Philipp Stephani
2017-06-12 22:10           ` Glenn Morris
2017-06-13  7:59             ` Philipp Stephani
2017-06-13 17:04               ` Glenn Morris
2017-06-13 18:50                 ` Philipp Stephani
2017-06-13  8:03         ` Philipp Stephani

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

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

  git send-email \
    --in-reply-to=1fvao16jco.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=27346@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.