delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2015/05/15/02:07:10

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=UHKG3GV1DLnYfvMyep5kUtOmescMNJnTr721ooG3Wlg=;
b=Y+QUZ9pQFEsxji6qGpMSjme+QYwJTviJxrTUanE1wUeIG1n+RxSYosiTLUFu3QeIa4
iF3013bJFW4wubSeQiZExWLG0O3Xa0wHWLLaARFwIzZ+DoLkr1ZXCK692d/0bsTm3Jvl
lvu/c57AKBMsZiIc6ENuwCBuqNeuymfVHu6az5RsQNraaHHg2FFZd6jrNkJrzPdAfuuO
COj1EAGiQgoTZ0VOst6TowHfWYY+MtfH8+EKe1Ezm9lGlkLN++B9uZvV6d+ASiJy05va
n1xkgoQQhTNVJjT5G2Esocsm4OEl8SykYDQhFsgPin7FH1C8m2CLYWZ69oITwpYamqb+
86jg==
MIME-Version: 1.0
X-Received: by 10.50.66.230 with SMTP id i6mr23028670igt.22.1431670004222;
Thu, 14 May 2015 23:06:44 -0700 (PDT)
In-Reply-To: <55556DFF.8020400@iki.fi>
References: <CAA2C=vCgLHdH3BJxastGzUsJzhiRddytiYwB1MP_aaiiVpC4nA AT mail DOT gmail DOT com>
<83k2wcjt8e DOT fsf AT gnu DOT org>
<CAA2C=vB-YiGkyx5dJpa=hcBh0O4_NiEKh2tKm5OHyNX3vW7HsQ AT mail DOT gmail DOT com>
<83bnhojnwh DOT fsf AT gnu DOT org>
<CAA2C=vAEKFUktuYXGN_eYUEY0JuHQgXR_-q-N8xox=7PHPEqqw AT mail DOT gmail DOT com>
<838ucsjnbl DOT fsf AT gnu DOT org>
<CAA2C=vAK_T9ixd6YpNrd2LYL80Lau-Dbf+T5vo89AdYXS0WYOw AT mail DOT gmail DOT com>
<83vbfvi3t1 DOT fsf AT gnu DOT org>
<CAA2C=vAUa61rumTN9fyCDdtdGXzqfzZLdtz4Nw+8gWX-J-x0bg AT mail DOT gmail DOT com>
<5554DF05 DOT 7020707 AT iki DOT fi>
<CAA2C=vD_NVLdHdqz8RSUeU3VniwrQ85=fn+WD0+pxMbZziuyHg AT mail DOT gmail DOT com>
<55556DFF DOT 8020400 AT iki DOT fi>
Date: Fri, 15 May 2015 09:06:44 +0300
Message-ID: <CAA2C=vDk5oJU1qPfVXZUoyNAJF-8GpvoqzqzMRUpiqiP48_Mew@mail.gmail.com>
Subject: Re: bad pragma in dir.h? (and our structrure packing)
From: "Ozkan Sezer (sezeroz AT gmail DOT com)" <djgpp AT delorie DOT com>
To: djgpp AT delorie DOT com
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 5/15/15, Andris Pavenis (andris DOT pavenis AT iki DOT fi) <djgpp AT delorie DOT com> wrote:
> On 05/14/2015 09:05 PM, Ozkan Sezer (sezeroz AT gmail DOT com) wrote:
>> There are however some doubts after I took a look at STATIC_ASSERT
>> implementation in Boost:
>>
>> http://www.boost.org/doc/libs/1_58_0/boost/static_assert.hpp
>>
>> We do not need all details (we're not interested about MSVC and like) but
>> even for GCC there is
>> more than 1 variant.
>> Do want to implement a public static_assert macro ?
> We need to be sure that such typedef will not cause warnings about unused
> typedef for some GCC
> versions. Most likely C and C++ both should be tested.
> boost/static_assert.hpp is good example and
> source information for C++.

I did test with gcc and g++ 5.1.0 djgpp cross compiler and got
no warnings.  Looking at gcc manual page, I see this:

'-Wunused-local-typedefs (C, Objective-C, C++ and Objective-C++ only)'
     Warn when a typedef locally defined in a function is not used.
     This warning is enabled by '-Wall'.

The typedefs I added are 'global' and not local to a function which
explains the lack of any warnings.  I can always add an unused
attribute to those typedefs, but there seems no need AFAICS.


Apart from that, do you think we should keep the pack pragmas
or should we live only with the packed attributes?


--
O.S.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019