[K42-discussion] [PATCH] These macros declare functions as both 'extern' and 'static'. This is strongly discouraged by the c++ spec and gcc 4 will not allow it. Instead, iso c++ suggests wrapping your extern functions in anonymous namespaces. See ISO-14882 7.3.1.1. Compiles correctly with both gcc 3 and gcc 4.1.

Donour Sizemore donour at cs.unm.edu
Tue Oct 3 09:28:06 EST 2006


If the commit mesg for this one is hard to read, here's it again.

[PATCH] These macros declare functions as both 'extern' and 'static'. 
This is strongly discouraged by the c++ spec and gcc 4 will not allow 
it. Instead, iso c++ suggests wrapping your extern functions in 
anonymous namespaces. See ISO-14882 7.3.1.1. Compiles correctly with 
both gcc 3 and gcc 4.1.

Thanks to Matthew Barrick for pointing out the correct solution to this one.

donour



More information about the K42-discussion mailing list