Bug #59611 Remove the pragma interface/implementation declarations
Submitted: 19 Jan 2011 11:45 Modified: 25 Mar 2011 19:18
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Tor Didriksen CPU Architecture:Any

[19 Jan 2011 11:45] Tor Didriksen
Description:
From what I can tell, these pragmas have been deprecated long ago.

http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/C_002b_002b-Interface.html#C_002b_002b-Interfa...

says:

#pragma interface and #pragma implementation provide the user with a way of explicitly directing the compiler to emit entities with vague linkage (and debugging information) in a particular translation unit.

Note: As of GCC 2.7.2, these #pragmas are not useful in most cases, because of COMDAT support and the “key method” heuristic mentioned in Vague Linkage. Using them can actually cause your program to grow due to unnecessary out-of-line copies of inline functions. Currently (3.4) the only benefit of these #pragmas is reduced duplication of debugging information, and that should be addressed soon on DWARF 2 targets with the use of COMDAT groups.

How to repeat:
Read the code.

Suggested fix:
Remove all these pragmas.
[25 Mar 2011 19:18] Paul DuBois
Code cleanup. No changelog entry needed.