X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=build-aux%2Fwarn-on-use.h;h=c14fb274fdcd7adefd0f8df9b6909f0a77f24784;hb=bcbcf0c59cec0e91db318eccdc564852bafa3c67;hp=37b6d2986a367deaefc1fcd77d71d3d255b659ff;hpb=c08fc917860633e239da067ff42c397cc4729933;p=gnulib.git diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h index 37b6d2986..c14fb274f 100644 --- a/build-aux/warn-on-use.h +++ b/build-aux/warn-on-use.h @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -67,7 +67,10 @@ /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) - +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use @@ -85,6 +88,10 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use