It doesn't seem like a problem of protobuf. Could you double-check you are using the same configuration for compiling?
On Thu, Mar 3, 2016 at 10:42 AM Seth Humphries <[email protected]> wrote: > I am using proto 3.0.0-beta-1 with a proto file that looks like this: > > ``` > syntax = "proto3"; > > message SomeMsg { > string query = 1; > int32 integer = 2; > float nothernum = 3; > } > ``` > > I am using gcc 4.9.2 with cmake 3.4.0. I use cmake to enable all gcc > warnings and treat all warnings as errors. > > I get the follow errors > ``` > error: comparing floating point with == or != is unsafe > [-Werror=float-equal] > if (this->nothernum() != 0) { > ^ > ``` > and > ``` > error: comparing floating point with == or != is unsafe > [-Werror=float-equal] > if (from.nothernum() != 0) { > ^ > ``` > > I have included the proto file in my hpp like ``` #include > <SomeMsg.pb.h>``` and still get the error. > > I can suppress the float-equal error but I would prefer to leave all > warnings on. The error goes away also if I use proto2 and make everything > optional. > > Anyone have other ideas of how to resolve this without suppressing the > warning and still use proto3? > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
