Bug #60247 | Gentoo QA Warnings in dev-db/mysql-workbench-5.2.31: strict-aliasing breakages, | ||
---|---|---|---|
Submitted: | 25 Feb 2011 6:56 | Modified: | 8 May 2011 17:37 |
Reporter: | Dan Wallis | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Workbench | Severity: | S3 (Non-critical) |
Version: | 5.2.31 | OS: | Any (Gentoo x86) |
Assigned to: | CPU Architecture: | Any |
[25 Feb 2011 6:56]
Dan Wallis
[13 Apr 2011 3:01]
Alfredo Kojima
suggest removing -fstrict-aliasing from compiler flags if that's enabled.
[8 May 2011 3:53]
Dan Wallis
How/why is this not a bug? http://gcc.gnu.org/ml/gcc-help/2006-08/msg00240.html Dereferencing pointer type punned will break strict-aliasing rules A quote: << 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
[8 May 2011 17:37]
Alfredo Kojima
This is an issue with the Python API. Suggest using -fno-strict-aliasing or file a bug against Python developers. http://mail.python.org/pipermail/python-dev/2003-July/036898.html In any case, this only happens because Gentoo (which is an unsupported platform) adds extra things to CFLAGS/CXXFLAGS