[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Using a enum type for a bitfield
From:       mats petersson via cfe-dev <cfe-dev () lists ! llvm ! org>
Date:       2015-08-26 11:38:54
Message-ID: CAL-htr7_ns+sQVGQSvn7vjOWsav8WNNt_mhTSuK5e==ZMC5KQg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


@Serge:

I think the point of bug 11272 is to actually document [directly or
referring to some other documentation elsewhere] ALL of the clang
implementation defined behaviour, which includes the behaviour with
bitfields from enums (and I expect it is identical to gcc's behaviour, but
I don't KNOW that this is the case).

--
Mats

On 26 August 2015 at 11:27, Serge Pavlov <sepavloff@gmail.com> wrote:

> Hi,
>
> Bug 11272 - document implementation-defined behavior
> <https://llvm.org/bugs/show_bug.cgi?id=11272> says nothing about bit
> fields.
>
> Thanks,
> --Serge
>
> 2015-08-26 15:28 GMT+06:00 mats petersson via cfe-dev <
> cfe-dev@lists.llvm.org>:
>
>> Bug number would be 11272 - the text has been mime-encoded to replace the
>> = with =3D (since mime uses = as a special character, and =3D is the
>> escaped = sign). Obviously, some step on the way didn't understand the
>> encoding and left it as plain text without decoding it.
>>
>> --
>> Mats
>>
>> On 26 August 2015 at 08:29, Csaba Raduly via cfe-dev <
>> cfe-dev@lists.llvm.org> wrote:
>>
>>> Hi.
>>>
>>> On Mon, Aug 24, 2015 at 10:29 PM, Hordijk, Michael via cfe-dev  wrote:
>>> > The short question:
>>> >
>>> > Does clang support using an enum as a type for a bit-field?
>>> >
>>> > C11 (6.7.2.1 P 5):
>>> >
>>> > A bit-field shall have a type that is a qualified or unqualified
>>> version
>>> > of _Bool, signed int, unsigned int, or some other
>>> implementation-defined
>>> > type.
>>> ...
>>> > So I'm curious as to whether clang supports it.  I did find this on
>>> > bugzilla:
>>> >
>>> > https://llvm.org/bugs/show_bug.cgi?id=3D11272
>>>
>>> LLVM Bugzilla says:
>>>
>>> '3D11272' is not a valid bug number.
>>>
>>>
>>> Csaba
>>> --
>>> GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
>>> The Tao of math: The numbers you can count are not the real numbers.
>>> Life is complex, with real and imaginary parts.
>>> "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus
>>> Torvalds
>>> "People disagree with me. I just ignore them." -- Linus Torvalds
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>>
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>@Serge: <br><br>I think the point of bug 11272 is to actually \
document [directly or referring to some other documentation elsewhere] ALL of the \
clang implementation defined behaviour, which includes the behaviour with bitfields \
from enums (and I expect it is identical to gcc&#39;s behaviour, but I don&#39;t KNOW \
that this is the case).<br><br>--<br></div>Mats<br></div><div \
class="gmail_extra"><br><div class="gmail_quote">On 26 August 2015 at 11:27, Serge \
Pavlov <span dir="ltr">&lt;<a href="mailto:sepavloff@gmail.com" \
target="_blank">sepavloff@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div><a \
href="https://llvm.org/bugs/show_bug.cgi?id=11272" target="_blank">Bug 11272 - \
document implementation-defined behavior</a> says nothing about bit \
fields.</div></div><div class="gmail_extra"><br \
clear="all"><div><div>Thanks,<br>--Serge<br></div></div><div><div class="h5"> \
<br><div class="gmail_quote">2015-08-26 15:28 GMT+06:00 mats petersson via cfe-dev \
<span dir="ltr">&lt;<a href="mailto:cfe-dev@lists.llvm.org" \
target="_blank">cfe-dev@lists.llvm.org</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div>Bug number would be 11272 - the text has \
been mime-encoded to replace the = with =3D (since mime uses = as a special \
character, and =3D is the escaped = sign). Obviously, some step on the way didn&#39;t \
understand the encoding and left it as plain text without decoding it. \
<br><br>--<br></div>Mats<br></div><div><div><div class="gmail_extra"><br><div \
class="gmail_quote">On 26 August 2015 at 08:29, Csaba Raduly via cfe-dev <span \
dir="ltr">&lt;<a href="mailto:cfe-dev@lists.llvm.org" \
target="_blank">cfe-dev@lists.llvm.org</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi.<br> <span><br>
On Mon, Aug 24, 2015 at 10:29 PM, Hordijk, Michael via cfe-dev   wrote:<br>
&gt; The short question:<br>
&gt;<br>
&gt; Does clang support using an enum as a type for a bit-field?<br>
&gt;<br>
&gt; C11 (6.7.2.1 P 5):<br>
&gt;<br>
&gt; A bit-field shall have a type that is a qualified or unqualified version<br>
&gt; of _Bool, signed int, unsigned int, or some other implementation-defined<br>
&gt; type.<br>
</span>...<br>
<span>&gt; So I&#39;m curious as to whether clang supports it.   I did find this \
on<br> &gt; bugzilla:<br>
&gt;<br>
&gt; <a href="https://llvm.org/bugs/show_bug.cgi?id=3D11272" rel="noreferrer" \
target="_blank">https://llvm.org/bugs/show_bug.cgi?id=3D11272</a><br> <br>
</span>LLVM Bugzilla says:<br>
<br>
&#39;3D11272&#39; is not a valid bug number.<br>
<br>
<br>
Csaba<br>
<span><font color="#888888">--<br>
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>
The Tao of math: The numbers you can count are not the real numbers.<br>
Life is complex, with real and imaginary parts.<br>
&quot;Ok, it boots. Which means it must be bug-free and perfect. &quot; -- Linus \
Torvalds<br> &quot;People disagree with me. I just ignore them.&quot; -- Linus \
Torvalds<br> </font></span><div><div>_______________________________________________<br>
 cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" \
target="_blank">cfe-dev@lists.llvm.org</a><br> <a \
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" \
target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br> \
</div></div></blockquote></div><br></div> \
</div></div><br>_______________________________________________<br> cfe-dev mailing \
list<br> <a href="mailto:cfe-dev@lists.llvm.org" \
target="_blank">cfe-dev@lists.llvm.org</a><br> <a \
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" \
target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br> \
<br></blockquote></div><br></div></div></div> </blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
cfe-dev mailing list
cfe-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic