[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2014-10-06 Thread protobuf

Updates:
Status: WontFix

Comment #24 on issue 83 by xiaof...@google.com: protobuf does not compile  
cleanly in 64-bit mode in Visual Studio 2008

https://code.google.com/p/protobuf/issues/detail?id=83

Please submit patches to our new github site:
https://github.com/google/protobuf/pulls

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2013-07-05 Thread protobuf


Comment #23 on issue 83 by kevin.ar...@gmail.com: protobuf does not compile  
cleanly in 64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

This patch addresses more of the warnings by making casts that implicitly  
narrow from unsigned to int or size_t to unsigned or int explicit.


It would be better to fix the code by using the correct type (size_t) to  
represent sizes of collections and strings, but that would be a far more  
intrusive change set.


Attachments:
make_narrowing_casts_explicit.patch  7.4 KB

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.




[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2011-12-13 Thread protobuf


Comment #22 on issue 83 by heydu...@gmail.com: protobuf does not compile  
cleanly in 64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

We applied some more patches to our copy of protobuf;
Doesn't address all of the problems listed, obviously, but it might be  
useful to some readers. It gave us a clean build, at least.

thanks.
ad

Attachments:
patch.diff  1.5 KB

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2011-07-27 Thread protobuf


Comment #20 on issue 83 by jacobgla...@yahoo.com: protobuf does not compile  
cleanly in 64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

This is getting really annoying for me.  I'm willing to start providing  
patches, but I'd like to discuss before I spend a lot of time. The first  
thing I noticed is that


WireFormat::VerifyUTF8String(const char* data, int size,  
WireFormat::Operation op)


is always used on std::string. I get tons of warnings in the pb.cc files  
about the std::string::size_type and that second argument not matching in  
size. I'd suggest changing that to


WireFormat::VerifyUTF8String(const std::string data, WireFormat::Operation  
op)


This requires a change to the built-in pb.cc files and cpp generator.


--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-11-30 Thread protobuf


Comment #18 on issue 83 by ken...@google.com: protobuf does not compile  
cleanly in 64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

Well that's easy enough.  Revision 351.

Leaving the bug open because I don't think this is the only thing people  
cared about.


--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-11-24 Thread protobuf


Comment #17 on issue 83 by heydunne: protobuf does not compile cleanly in  
64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

My apologies; the functions did not change; I was reading an *internally*  
patched version  of 2.2.0.
FWIW, we modified src/google/protobuf/io/coded_stream.h with the attached  
patch ( it does not resolve all the issues described in this bug report,  
but it resolved our compilation problems  with WriteString and  
WriteStringToArray without runtime issues, and without having to suppress  
compilation warnings; perhaps it might help others here )
As an aside, thanks for making protobuf open-source, it's had a profound  
positive effect on some of our ipc work.

thanks






Attachments:
difference.txt  266 bytes

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-11-23 Thread protobuf


Comment #16 on issue 83 by ken...@google.com: protobuf does not compile  
cleanly in 64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

The code of those two functions did not change between 2.2.0 and 2.3.0, so  
I'm not sure what you mean when you say 2.2.0 used static_casts there.


Anyway, this bug is marked NeedPatchFromUser.  You can see above that  
halostatue proposed a patch but I felt that it was too invasive.  If you  
can produce a patch that is better then we can consider submitting it.   
However, we simply cannot satisfy every possible compiler warning  
configuration used by every user.  I'll accept patches that are simple and  
clean, but a better solution would be for you to tell your compiler to  
ignore warnings in the protobuf headers.


--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-11-19 Thread protobuf


Comment #15 on issue 83 by heydunne: protobuf does not compile cleanly in  
64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

Hi.
I wonder if there has been any development in this since the last post. We  
upgraded to 2.3.0 to support vc10 compilation, and these warnings are  
bothering the build gatekeepers in our team.

I notice that v2.2.0 uses static_castint in both
CodedOutputStream::WriteString
and
CodedOutputStream::WriteStringToArray
whereas 2.3.0 does not.
Since the target functions (WriteRaw,WriteRawToArray) will implicitly  
convert the size_t parameter to int anyways, the solution that seems the  
easiest to us is to revert to casting those arguments to int using  
static_cast in the calling functions ( as was done in 2.2.0 )

Is there any reason not to do this?
thanks
Aidan Dunne.




--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-02-24 Thread protobuf


Comment #14 on issue 83 by temporal: protobuf does not compile cleanly in  
64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83


The problem with the truncating_cast as you've specified is that both
warning 4244 and 4267 are reported;


So disable both, then.  Still better than adding pragmas everywhere where  
this

happens.

A possible different alternative is to change the code generator so that  
the

generated .cc files include these headers with the appropriate pragma


I don't think that helps because it's not just the .pb.cc files that must  
include these.

Your own code may need to use them directly as well.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-02-23 Thread protobuf


Comment #12 on issue 83 by ken...@google.com: protobuf does not compile  
cleanly in 64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

Yikes, adding #pragmas all over like that is pretty ugly.

What is the proper way to prevent these warnings in MSVC, without disabling  
them?
Explicit casts?  I'd much rather do that than add pragmas everywhere.   
Better yet,

maybe we could define a new cast:

template typename To, typename From
To truncating_cast(From value) {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4244)
#endif
  return value;
#ifdef _MSC_VER
#pragma warning(pop)
#endif
}

Then use that everywhere...

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-02-23 Thread protobuf


Comment #13 on issue 83 by halostatue: protobuf does not compile cleanly in  
64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

Yeah, it's a little ugly, but it's consistent with what I've seen in gtest.  
The problem with the truncating_cast as
you've specified is that both warning 4244 and 4267 are reported; there are  
probably others you'd have to

worry about.

I think that explicit casts may be the way to fix this, but I'm not sure  
offhand (we'd have to test it in our build,

which I don't see happening for a few days).

This matters very much to us because we have treat warnings as errors and  
these are in headers that, if I

recall correctly, we can't avoid using in our code.

A possible different alternative is to change the code generator so that  
the generated .cc files include these
headers with the appropriate pragma warning(disable: 4244 4267) guard  
(again; I don't recall if it's

warning(disable: 4244 4267) or warning(disable: 4244, 4267)).

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-02-17 Thread protobuf


Comment #8 on issue 83 by halostatue: protobuf does not compile cleanly in  
64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

Visual Studio cannot disable warnings for third-party headers. I'm not sure  
that
disabling these warnings in stubs/common.h is the right place for this;  
looking
through the externed gtest code (where a number of #pragma warning options  
are used),
these are tightly constrained to the code where the warning is generated.  
As such, the

attached patch does the same.

Attachments:
fix-vs-warnings.h  1.0 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



[protobuf] Re: Issue 83 in protobuf: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008

2010-02-17 Thread protobuf


Comment #9 on issue 83 by halostatue: protobuf does not compile cleanly in  
64-bit mode in Visual Studio 2008

http://code.google.com/p/protobuf/issues/detail?id=83

Visual Studio cannot disable warnings for third-party headers. I'm not sure  
that
disabling these warnings in stubs/common.h is the right place for this;  
looking
through the externed gtest code (where a number of #pragma warning options  
are used),
these are tightly constrained to the code where the warning is generated.  
As such, the
attached patch does the same. [This patch suppresses both the 32-bit and  
the 64-bit

warnings.]

Attachments:
fix-vs-warnings.h  3.2 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.