bugThe libunwind project - Bugs: bug #41017, [PATCH] Don't use empty structs...


bug #41017: [PATCH] Don't use empty structs with clang

Submitted by:  Bernhard Rosenkraenzer <bero>
Submitted on:  Fri 27 Dec 2013 08:45:00 PM UTC  
Votes:  1  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 02 Jun 2015 10:35:17 AM UTC, comment #1:

The patch needs to be updated for other architectures as well...

Marcin CieĊ›lak <saper>
Fri 27 Dec 2013 08:45:00 PM UTC, original submission:

With clang, including an extern "C" header with an empty struct in C++ code results in a build failure:

empty struct has size 0 in C, size 1 in C++

So for the sake of compatibility, the struct should have a size of 1 unconditionally when building with clang. Attaching patch.

Bernhard Rosenkraenzer <bero>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #30120:  libunwind-clang-empty-structs.patch added by bero (992B - text/x-patch - Patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by djwatson24 (Updated the item)
  • -email is unavailable- added by saper (Posted a comment)
  • -email is unavailable- added by saper (Voted in favor of this item)
  • -email is unavailable- added by bero
  • -email is unavailable- added by bero (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 1 encouragement so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 13 Jan 2017 05:27:33 PM UTCdjwatson24Open/ClosedOpen=>Closed
    Tue 02 Jun 2015 10:34:44 AM UTCsaperCarbon-Copy-=>Added saper
    Fri 27 Dec 2013 08:45:00 PM UTCberoAttached File-=>Added libunwind-clang-empty-structs.patch, #30120
      Carbon-Copy-=>Added -email is unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1