You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2007/01/12 00:58:48 UTC
[jira] Updated: (AMQCPP-42) A few more strict aliasing warnings
[ https://issues.apache.org/activemq/browse/AMQCPP-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish updated AMQCPP-42:
-------------------------------
Priority: Minor (was: Critical)
Fix Version/s: (was: 1.1)
2.0
Assignee: Timothy Bish (was: Nathan Mittler)
Issue Type: Improvement (was: Bug)
> A few more strict aliasing warnings
> -----------------------------------
>
> Key: AMQCPP-42
> URL: https://issues.apache.org/activemq/browse/AMQCPP-42
> Project: ActiveMQ C++ Client
> Issue Type: Improvement
> Affects Versions: 1.1
> Reporter: Albert Strasheim
> Assigned To: Timothy Bish
> Priority: Minor
> Fix For: 2.0
>
>
> Brought over from AMQCPP-25.
> We might consider using -Wstrict-aliasing=2. Warns in more cases, with some chance of false positives.
> I still get the following warnings with GCC 4.1.1 on FC6 with revision 495335:
> {noformat}
> activemq/network/ServerSocket.cpp: In member function 'virtual void activemq::network::ServerSocket::bind(const char*, int, int)':
> activemq/network/ServerSocket.cpp:162: warning: dereferencing type-punned pointer might break strict-aliasing rules
> activemq/network/ServerSocket.cpp: In member function 'virtual activemq::network::Socket* activemq::network::ServerSocket::accept()':
> activemq/network/ServerSocket.cpp:208: warning: dereferencing type-punned pointer might break strict-aliasing rules
> activemq/io/DataInputStreamTest.h:85: warning: dereferencing type-punned pointer will break strict-aliasing rules
> activemq/io/DataInputStreamTest.h:86: warning: dereferencing type-punned pointer will break strict-aliasing rules
> {noformat}
> I noticed you used a memcpys to fix this issue. Did you consider trying a union? Without knowing for certain (maybe we'll do some benchmarks tomorrow), a union might be faster than a call to memcpy.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira