Topic: Complier flag that warns the user where C++11


Author: vittorio.romeo@outlook.com
Date: Wed, 5 Dec 2012 13:41:04 -0800 (PST)
Raw View
------=_Part_27_32682841.1354743664942
Content-Type: text/plain; charset=ISO-8859-1

Today I had an idea of having a warning compiler flag (-Wmodern) that gives
the user a warning where a new C++11 feature can be used in the code.
Some examples could be suggesting a unique_ptr instead of a pointer with
"new" keyword allocation, using the uniform curly brace initialization
syntax where possible, or simply using auto instead of long type names.


--




------=_Part_27_32682841.1354743664942
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Today I had an idea of having a warning compiler flag (-Wmodern) that gives=
 the user a warning where a new C++11 feature can be used in the code.<br>S=
ome examples could be suggesting a unique_ptr instead of a pointer with "ne=
w" keyword allocation, using the uniform curly brace initialization syntax =
where possible, or simply using auto instead of long type names.<br><br><br=
>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_27_32682841.1354743664942--

.


Author: Martinho Fernandes <martinho.fernandes@gmail.com>
Date: Wed, 05 Dec 2012 22:42:24 +0100
Raw View
On 05.12.2012 22:41, vittorio.romeo@outlook.com wrote:
> Today I had an idea of having a warning compiler flag (-Wmodern) that=20
> gives the user a warning where a new C++11 feature can be used in the=20
> code.
> Some examples could be suggesting a unique_ptr instead of a pointer=20
> with "new" keyword allocation, using the uniform curly brace=20
> initialization syntax where possible, or simply using auto instead of=20
> long type names.
This is something you should ask of your compiler writer, not the=20
standard. The standard has no say in what warnings can be emitted, much=20
less in what flags to use.

--=20
Mit freundlichen Gr=FC=DFen,

Martinho Fernandes

--=20




.


Author: vittorio.romeo@outlook.com
Date: Wed, 5 Dec 2012 13:44:40 -0800 (PST)
Raw View
------=_Part_25_33166256.1354743880209
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Sorry, I'll send the proposal to the GCC team.

Il giorno mercoled=EC 5 dicembre 2012 22:42:24 UTC+1, R. Martinho Fernandes=
=20
ha scritto:
>
> On 05.12.2012 22:41, vittori...@outlook.com <javascript:> wrote:=20
> > Today I had an idea of having a warning compiler flag (-Wmodern) that=
=20
> > gives the user a warning where a new C++11 feature can be used in the=
=20
> > code.=20
> > Some examples could be suggesting a unique_ptr instead of a pointer=20
> > with "new" keyword allocation, using the uniform curly brace=20
> > initialization syntax where possible, or simply using auto instead of=
=20
> > long type names.=20
> This is something you should ask of your compiler writer, not the=20
> standard. The standard has no say in what warnings can be emitted, much=
=20
> less in what flags to use.=20
>
> --=20
> Mit freundlichen Gr=EF=BF=BD=EF=BF=BDen,=20
>
> Martinho Fernandes=20
>
>

--=20




------=_Part_25_33166256.1354743880209
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Sorry, I'll send the proposal to the GCC team.<br><br>Il giorno mercoled=EC=
 5 dicembre 2012 22:42:24 UTC+1, R. Martinho Fernandes ha scritto:<blockquo=
te class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left:=
 1px #ccc solid;padding-left: 1ex;">On 05.12.2012 22:41, <a href=3D"javascr=
ipt:" target=3D"_blank" gdf-obfuscated-mailto=3D"7cgAHZPO50YJ">vittori...@o=
utlook.com</a> wrote:
<br>&gt; Today I had an idea of having a warning compiler flag (-Wmodern) t=
hat=20
<br>&gt; gives the user a warning where a new C++11 feature can be used in =
the=20
<br>&gt; code.
<br>&gt; Some examples could be suggesting a unique_ptr instead of a pointe=
r=20
<br>&gt; with "new" keyword allocation, using the uniform curly brace=20
<br>&gt; initialization syntax where possible, or simply using auto instead=
 of=20
<br>&gt; long type names.
<br>This is something you should ask of your compiler writer, not the=20
<br>standard. The standard has no say in what warnings can be emitted, much=
=20
<br>less in what flags to use.
<br>
<br>--=20
<br>Mit freundlichen Gr=EF=BF=BD=EF=BF=BDen,
<br>
<br>Martinho Fernandes
<br>
<br></blockquote>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_25_33166256.1354743880209--

.


Author: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Date: Thu, 6 Dec 2012 01:14:36 +0100
Raw View
--047d7b15a1eff2477004d023fb2c
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Dec 5, 2012 at 10:44 PM, <vittorio.romeo@outlook.com> wrote:

> Sorry, I'll send the proposal to the GCC team.


I think someone from Google mentioned on the Clang compiler mailing list
that they were working on tools that could do that and even refactor some
code for you.
You should ask on clang mailing list too.

Joel Lamotte

--




--047d7b15a1eff2477004d023fb2c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed, Dec 5=
, 2012 at 10:44 PM,  <span dir=3D"ltr">&lt;<a href=3D"mailto:vittorio.romeo=
@outlook.com" target=3D"_blank">vittorio.romeo@outlook.com</a>&gt;</span> w=
rote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Sorry, I&#39;ll send the proposal to the GCC=
 team.</blockquote></div><br></div><div class=3D"gmail_extra">I think someo=
ne from Google=A0mentioned=A0on the Clang compiler mailing list that they w=
ere working on tools that could do that and even refactor some code for you=
..<br>
You should ask on clang mailing list too.<br><br>Joel Lamotte</div><div cla=
ss=3D"gmail_extra"><br></div>

<p></p>

-- <br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />

--047d7b15a1eff2477004d023fb2c--

.