← Back to team overview

kicad-developers team mailing list archive

Re: [patch] Warnings removal

 

On Mon, Mar 3, 2014 at 1:26 PM, Lorenzo Marcantonio <
l.marcantonio@xxxxxxxxxxxx> wrote:

> On Mon, Mar 03, 2014 at 07:02:44PM +0100, Camille 019 wrote:
> > Here is a set of 3 patch to remove some warning.
> >
> > * in-class initializer for static data member of type 'const double' is
> a GNU extension [-Wgnu-static-float-init]
> > * struct/class '???' was previously declared as a class/struct
> [-Wmismatched-tags]
> > * implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
>
> Applause on all three points :D
>
> For the first one I *never* get why the standard says so...
>
> The second one is just careless programming (while in fact the *only*
> difference between class and struct is the default access)
>

Actually, MSVC mangles symbol names differently depending on whether a
struct/class is "struct" or "class". This means that if you use a forward
declaration that doesn't have the right tag, then the symbol names that
MSVC will actually call into will be wrong. That is why Clang has this
warning.

This is an issue "outside the standard", but it was deemed sufficiently
important to be incorporated as a warning. (I haven't read through it, but
this link might has more information <
http://stackoverflow.com/questions/5712514/can-gcc-produce-struct-class-name-mismatches-like-vs
>)

-- Sean Silva


>
> The third one is really ugly :D
>
> --
> Lorenzo Marcantonio
> Logos Srl
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

References