Le 12/03/2011 01:28, Lex Trotman a écrit :
On 12 March 2011 06:30, Colomban Wendling lists.ban@herbesfolles.org wrote:
Le 11/03/2011 19:57, Nick Treleaven a écrit :
Hi, tagmanager/mio/mio-memory.c uses G_VA_COPY() but on my system this is defined as va_copy() (by glibconfig.h, I think).
When I compile with my usual flags including warnings and -ansi, va_copy is not defined. Any ideas how to solve this?
It seems to be a GLib issue that may be solved in newer versions - I still have glib2-2.14.4-1.fc8. Is anyone else using -ansi?
Hum, that's problematic, right... This problem still happens with GLib 2.28. However, it may be quite hard to fix in the GLib side: they find the proper implementation at configure time, and if none found fallback to manual copy (implementation depends on the target then). The problem is that GLib has been built without -ansi on your system and found a working va_copy, but -ansi disabled it a compile-time...
Ouch nasty, raises the point that maybe we shouldn't be building the application with different compile flags to the major binary libraries, there ciould be other potential problems.
I guess this kind of problem only apply when using a compiler flag that changes the subset of functionality supported by the compiler (e.g. -std=*).
Even things like -Werror=implicit-function-declaration (again :D) wouldn't be a problem IMO: either the library headers pass fine with it or the library has serious problems that better get fixed.
Cheers, Colomban