Updated Issue 181 - warning: dereferencing type-punned pointer will break strict-aliasing rules (monotone)

[email protected]
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
Hello,

The following issue has been updated:

181 - warning: dereferencing type-punned pointer will break strict-aliasing rules
Project: monotone
Status: New
Reported by: Peter Volkov
URL: https://code.monotone.ca/p/monotone/issues/181/
Labels:
 Type:Defect
 Priority:Medium

Comments (last first):

# By Richard Levitte, Sep 12, 2011:

It boils down to the use of CMD_REF.  The way it's used in those places is probably ill advised, would there be a better way?  Maybe a CMD_REF2 that doesn't cast to commands::command*...

# By Peter Volkov, Sep  5, 2011:

During monotone-1.0 build gcc reports following warnings:

src/commands.cc:450:57: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/commands.cc:460:88: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/automate.cc:2426:53: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/automate.cc:2441:73: warning: dereferencing type-punned pointer will break strict-aliasing rules


This may compile fine but exhibit random runtime failures.



--
Issue: https://code.monotone.ca/p/monotone/issues/181/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.