[bug-notifications] [libassuan 0004628]: assuan-uds.c:211:3: warning: dereferencing type-punned pointer will break strict-aliasing rules
Mantis Bug Tracker
noreply at opencsw.org
Tue Dec 7 19:29:48 CET 2010
The following issue has been SUBMITTED.
======================================================================
https://www.opencsw.org/mantis/view.php?id=4628
======================================================================
Reported By: c1pher
Assigned To:
======================================================================
Project: libassuan
Issue ID: 4628
Category: other
Reproducibility: always
Severity: trivial
Priority: normal
Status: new
======================================================================
Date Submitted: 2010-12-07 19:29 CET
Last Modified: 2010-12-07 19:29 CET
======================================================================
Summary: assuan-uds.c:211:3: warning: dereferencing
type-punned pointer will break strict-aliasing rules
Description:
Small Quality Assurance issue.
To quote the Gentoo bug report:
The most common warning you will see is probably "dereferencing type-
punned pointer will break strict-aliasing rules". The place where it
warns is in general not wrong -- what gcc tries to tell you is that you
will break the aliasing rules when you dereference the pointer later
(unless you cast it back to its original type first). This warning
should be interpreted as saying that your interfaces are badly designed,
and the correct way to avoid the warning is to redesign them in a way
where you do not need to cast between conflicting types. (Even if you
often can make this warning go away by changing void** to void*...) >>
Please read the actual standard too. The rules about pointer type
conversions are at 6.3.2.3. The appropriate paragraphs are paragraphs
1 and 7.
http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf.
Our bug report is located at:
http://bugs.gentoo.org/show_bug.cgi?id=347807
======================================================================
More information about the bug-notifications
mailing list