]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: remove unneeded suggest-attributes pragmas
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 18 Feb 2024 05:36:37 +0000 (21:36 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 18 Feb 2024 08:29:59 +0000 (00:29 -0800)
* gl/lib/fadvise.c: Remove pragma that works around GCC bug 83559
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83559>.
This bug was fixed in GCC 9, and we needn’t worry about
--enable-gcc-warnings for compilers that old.
* src/test.c: Likewise.

gl/lib/fadvise.c
src/test.c

index 4bbd3059e88cb7723f83fd82cbf90e6832d5b61c..ed5b7ae32839130917d19071bce01581cdebb3e3 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* Without this pragma, gcc suggests that (given !HAVE_POSIX_FADVISE)
-   the fdadvise function might be a candidate for attribute 'const'.  */
-#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
-# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
-#endif
-
 #include <config.h>
 #include "fadvise.h"
 
index 09804cf38d5ccca0e256603fc1a98cc8fad80405..2da04d4c5afe52b1bff73dc4bff9fc4126da8378 100644 (file)
 /* Define TEST_STANDALONE to get the /bin/test version.  Otherwise, you get
    the shell builtin version. */
 
-/* Without this pragma, gcc 4.6.2 20111027 mistakenly suggests that
-   the advance function might be candidate for attribute 'pure'.  */
-#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
-# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
-#endif
-
 #include <config.h>
 #include <ctype.h>
 #include <stdio.h>