comparison lib/propername.c @ 16130:376ca4146b05

propername: do not mark proper_name with the const attribute * lib/propername.h (proper_name): Do *not* mark as _GL_ATTRIBUTE_CONST, since it examines data pointed to by its parameter. * lib/propername.c (proper_name): Instead, add a pragma to suppress the suggestion from -Wsuggest-attribute=const.
author Jim Meyering <meyering@redhat.com>
date Mon, 28 Nov 2011 10:24:04 +0100
parents 6ef4f1f39105
children 732c22001112
comparison
equal deleted inserted replaced
16129:5595ced97d38 16130:376ca4146b05
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18 /* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that
19 the proper_name function might be candidate for attribute 'const' */
20 #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
21 # pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
22 #endif
17 23
18 #include <config.h> 24 #include <config.h>
19 25
20 /* Specification. */ 26 /* Specification. */
21 #include "propername.h" 27 #include "propername.h"