This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/17266] Always defining __extern_always_inline may generate infinite recursion


https://sourceware.org/bugzilla/show_bug.cgi?id=17266

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.20/master has been updated
       via  d73ac1bb436cf1adb62335f53b4fc91a02f40a3b (commit)
      from  33ceaf6187b31ea15284ac65131749e1cb68d2ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d73ac1bb436cf1adb62335f53b4fc91a02f40a3b

commit d73ac1bb436cf1adb62335f53b4fc91a02f40a3b
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Mon Nov 24 17:25:56 2014 +0530

    Make __extern_always_inline usable on clang++ again

    The fix for BZ #17266 (884ddc5081278f488ef8cd49951f41cfdbb480ce)
    removed changes that had gone into cdefs.h to make
    __extern_always_inline usable with clang++.  This patch adds back
    support for clang to detect if GNU inlining semantics are available,
    this time without breaking the gcc use case.  The check put here is
    based on the earlier patch and assertion[1] that checking if
    __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ is defined is sufficient
    to determine that clang++ suports GNU inlining semantics.

    Tested with a simple program that builds with __extern_always_inline
    with the patch and fails compilation without it.

     #include <stdio.h>
     #include <sys/cdefs.h>

    extern void foo_alias (void) __asm ("foo");

    __extern_always_inline void
    foo (void)
    {
      puts ("hi oh world!");
      return foo_alias ();
    }

    void
    foo_alias (void)
    {
      puts ("hell oh world");
    }

    int
    main ()
    {
      foo ();
    }

    [1] https://sourceware.org/ml/libc-alpha/2012-12/msg00306.html

        [BZ #17266]
        * misc/sys/cdefs.h: Define __extern_always_inline for clang
        4.2 and newer.

    (cherry picked from commit 602f80ec8b966cfad3b61914cbe14ee606cedf6e)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    6 ++++++
 misc/sys/cdefs.h |   10 ++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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