FYI, Worth updating, because if you follow the advice provoked by this warning option (i.e., you declare test.c's advance function with the pure attribute), gcc will then compile test in such a way that the program infloops.
>From 040bc8b50fe36120ed3fec10575df2590b081eca Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Sun, 27 Nov 2011 13:51:40 +0100 Subject: [PATCH] maint: update comment gcc-4.6.2 still botches -Wsuggest-attribute=pure * configure.ac: Update the comment on which gcc versions still must not use -Wsuggest-attribute=pure option: still required on post- Fedora 16 rawhide's 4.6.2 20111027. --- configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 3c4681c..a174178 100644 --- a/configure.ac +++ b/configure.ac @@ -124,7 +124,7 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-Wno-format-nonliteral]) gl_WARN_ADD([-Wno-unsuffixed-float-constants]) - # Enable this warning only with gcc-4.7 and newer. With 4.6.1 20110824, + # Enable this warning only with gcc-4.7 and newer. With 4.6.2 20111027, # it suggests test.c's advance function may be pure, even though it # increments a global variable. Oops. # Normally we'd write code to test for the precise failure, but that -- 1.7.8.rc3.31.g017d1
