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

List:       cfe-dev
Subject:    Re: [cfe-dev] [libcxx] Policy with respect to language extensions
From:       Richard Smith via cfe-dev <cfe-dev () lists ! llvm ! org>
Date:       2015-08-13 0:09:22
Message-ID: CAOfiQqmcZqG-+9FOJDLXeGvKgdtNWkxuOkYGvhB8wq7pdCpxOA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Aug 12, 2015 at 4:01 PM, Hal Finkel <hfinkel@anl.gov> wrote:

> ----- Original Message -----
> > From: "Marshall Clow" <mclow.lists@gmail.com>
> > To: "David Majnemer" <david.majnemer@gmail.com>
> > Cc: "Richard Smith" <richard@metafoo.co.uk>, "clang developer list" <
> cfe-dev@lists.llvm.org>, "Gonzalo BG"
> > <gonzalobg88@gmail.com>
> > Sent: Wednesday, August 12, 2015 5:05:05 PM
> > Subject: Re: [cfe-dev] [libcxx] Policy with respect to language
> extensions
> >
> > On Wed, Aug 12, 2015 at 11:32 AM, David Majnemer <
> > david.majnemer@gmail.com > wrote:
> >
> >
> > On Wed, Aug 12, 2015 at 2:05 PM, Richard Smith <
> > richard@metafoo.co.uk > wrote:
> >
> >
> >
> > I think it would also be useful to have a "strictly conforming" (or
> > as close as we can reasonably get) mode, controlled by a macro.
> >
> >
> > Wouldn't we have to be extra careful or we could get ODR violations
> > across object/shared object boundaries if one wanted extra
> > conformance but another did not?
> >
> > Yes.
> >
> >
> > -- Marshall
>
> Having a macro to control this seems like a recipe for bad things (ODR
> violation being only one problem).
>

What sort of actual bad things do you envisage? People will, of course, be
able to shoot themselves in the foot by having an inconsistent definition
in different translation units, but we don't necessarily need to support
that. And it seems like we should be able to avoid this having an ABI
impact on sane code.


> I think the best we can do at this point is have the compiler issue a
> warning in pedantic mode. Maybe we could add some kind of extension
> attribute for this purpose (although we'd need to think carefully about
> when to actually generate the warning - every time some extension
> participates in some overload set might be problematic).
>
>  -Hal
>
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> >
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
>

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 12, 2015 \
at 4:01 PM, Hal Finkel <span dir="ltr">&lt;<a href="mailto:hfinkel@anl.gov" \
target="_blank">hfinkel@anl.gov</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">----- Original Message \
-----<br> &gt; From: &quot;Marshall Clow&quot; &lt;<a \
href="mailto:mclow.lists@gmail.com">mclow.lists@gmail.com</a>&gt;<br> &gt; To: \
&quot;David Majnemer&quot; &lt;<a \
href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>&gt;<br> &gt; Cc: \
&quot;Richard Smith&quot; &lt;<a \
href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>&gt;, &quot;clang \
developer list&quot; &lt;<a \
href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>&gt;, &quot;Gonzalo \
BG&quot;<br> &gt; &lt;<a \
href="mailto:gonzalobg88@gmail.com">gonzalobg88@gmail.com</a>&gt;<br> &gt; Sent: \
Wednesday, August 12, 2015 5:05:05 PM<br> &gt; Subject: Re: [cfe-dev] [libcxx] Policy \
with respect to language extensions<br> &gt;<br>
&gt; On Wed, Aug 12, 2015 at 11:32 AM, David Majnemer &lt;<br>
&gt; <a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a> &gt; \
wrote:<br> &gt;<br>
&gt;<br>
&gt; On Wed, Aug 12, 2015 at 2:05 PM, Richard Smith &lt;<br>
&gt; <a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a> &gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I think it would also be useful to have a &quot;strictly conforming&quot; \
(or<br> &gt; as close as we can reasonably get) mode, controlled by a macro.<br>
&gt;<br>
&gt;<br>
&gt; Wouldn&#39;t we have to be extra careful or we could get ODR violations<br>
&gt; across object/shared object boundaries if one wanted extra<br>
&gt; conformance but another did not?<br>
&gt;<br>
&gt; Yes.<br>
&gt;<br>
&gt;<br>
&gt; -- Marshall<br>
<br>
</div></div>Having a macro to control this seems like a recipe for bad things (ODR \
violation being only one problem).<br></blockquote><div><br></div><div>What sort of \
actual bad things do you envisage? People will, of course, be able to shoot \
themselves in the foot by having an inconsistent definition in different translation \
units, but we don&#39;t necessarily need to support that. And it seems like we should \
be able to avoid this having an ABI impact on sane code.</div><div>  \
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> I think the best we can do at this point is have the \
compiler issue a warning in pedantic mode. Maybe we could add some kind of extension \
attribute for this purpose (although we&#39;d need to think carefully about when to \
actually generate the warning - every time some extension participates in some \
overload set might be problematic).<br> <br>
  -Hal<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; cfe-dev mailing list<br>
&gt; <a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
&gt; <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>
 &gt;<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</font></span></blockquote></div><br></div></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