GNU bug report logs - #27346
module tests fail to compile with gcc 4.8.5

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Mon, 12 Jun 2017 17:38:01 UTC

Severity: normal

Found in version 26.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 27346 <at> debbugs.gnu.org
Subject: bug#27346: module tests fail to compile with gcc 4.8.5
Date: Mon, 12 Jun 2017 21:33:48 +0000
[Message part 1 (text/plain, inline)]
Glenn Morris <rgm <at> gnu.org> schrieb am Mo., 12. Juni 2017 um 22:30 Uhr:

> 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.
>
>
No, emacs-module.h cannot include any headers except standard C headers.


>
> 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
>
>
>
Probably yes, thanks. (I don't know why the && expression doesn't work.)


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

Do you get a more detailed error message?
[Message part 2 (text/html, inline)]

This bug report was last modified 7 years and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.