diff options
Diffstat (limited to 'gl/warn-on-use.h')
| -rw-r--r-- | gl/warn-on-use.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gl/warn-on-use.h b/gl/warn-on-use.h index 30756034..701013a0 100644 --- a/gl/warn-on-use.h +++ b/gl/warn-on-use.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* A C macro for emitting warnings if a function is used. | 1 | /* A C macro for emitting warnings if a function is used. |
| 2 | Copyright (C) 2010-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2010-2024 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software: you can redistribute it and/or modify it | 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU Lesser General Public License as published | 5 | under the terms of the GNU Lesser General Public License as published |
| @@ -32,6 +32,10 @@ | |||
| 32 | _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' | 32 | _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
| 33 | linkage. | 33 | linkage. |
| 34 | 34 | ||
| 35 | _GL_WARN_ON_USE should not be used more than once for a given function | ||
| 36 | in a given compilation unit (because this may generate a warning even | ||
| 37 | if the function is never called). | ||
| 38 | |||
| 35 | However, one of the reasons that a function is a portability trap is | 39 | However, one of the reasons that a function is a portability trap is |
| 36 | if it has the wrong signature. Declaring FUNCTION with a different | 40 | if it has the wrong signature. Declaring FUNCTION with a different |
| 37 | signature in C is a compilation error, so this macro must use the | 41 | signature in C is a compilation error, so this macro must use the |
