Re: Link convention fixes

2009-11-27 Thread Kinkie
On Fri, Nov 27, 2009 at 11:22 PM, Robert Collins
 wrote:
> Can you give an example of what you're talking about, and show the
> compiler warning you're getting too? (And what flags are needed to get
> it)?

e.g.

ccache /opt/SunStudioExpress/prod/bin/CC -DHAVE_CONFIG_H
-DDEFAULT_CONFIG_FILE=\"/export/hom
e/hudson/squid-trunk/btlayer-02-maximus/squid-3.HEAD-BZR/_inst/etc/squid.conf\"
-DDEFAULT_SQUID_DATA
_DIR=\"/export/home/hudson/squid-trunk/btlayer-02-maximus/squid-3.HEAD-BZR/_inst/share\"
-DDEFAULT_S
QUID_CONFIG_DIR=\"/export/home/hudson/squid-trunk/btlayer-02-maximus/squid-3.HEAD-BZR/_inst/etc\"
 -
I../.. -I../../include -I../../src -I../include -I/usr/local/include
-I/usr/include/gssapi -I/usr/in
clude/kerberosv5 -I../../lib -I../../lib/libLtdl -I../src
-I/usr/include/gssapi -I/usr/include/kerbe
rosv5  -I/usr/include/libxml2  -I/usr/include/libxml2
-D_FILE_OFFSET_BITS=64 -g -c -o mem.o ../../
src/mem.cc
"../../src/mem.cc", line 570: Warning (Anachronism): Using extern "C"
void(*)(void*) to initialize void(*)(void*).
1 Warning(s) detected.

compiler is sunstudio cc, default testsuite flags.
A "layer-02" build has 125 of those.

-- 
/kinkie


Re: Link convention fixes

2009-11-27 Thread Robert Collins
Can you give an example of what you're talking about, and show the
compiler warning you're getting too? (And what flags are needed to get
it)?

-Rob


signature.asc
Description: This is a digitally signed message part


Link convention fixes

2009-11-27 Thread Kinkie
Hi all,
  I'm currently working on fixing the (many) instances of wrong call
conventions (pointers to extern C functions being stored as variables
where a c++ linkage is specified). Those are not fatal, but getting
rid of them would make clearer what is c++ -clean and what is not.
There is one case where this cannot really be done, and that's xxfree.

How would you suggest addressing this? The best idea i have is to
duplicate the code somehow in a .cc file, and rename the c
implementation as 'cxfree'.

Thanks

-- 
/kinkie