]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s390: Warn about non-overloaded deprecated builtins
authorStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Fri, 12 Dec 2025 19:44:45 +0000 (20:44 +0100)
committerStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Fri, 12 Dec 2025 19:44:45 +0000 (20:44 +0100)
Previously a warning for a deprecated builtin was only emitted for
overloaded builtins.  Warn about non-overloaded deprecated builtins,
too.

gcc/ChangeLog:

* config/s390/s390.cc (s390_expand_builtin): Warn about
non-overloaded deprecated builtins.

gcc/config/s390/s390.cc

index 359ea1c3d64bc9dec2f84cdebad7d080f91c34bd..d2a7fa299786a5d9ba3b95c4e5754c8455918cc3 100644 (file)
@@ -917,6 +917,9 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
          error ("Builtin %qF requires z17 or higher", fndecl);
          return const0_rtx;
        }
+
+      if (bflags & B_DEP)
+       warning (0, "builtin %qF is deprecated", fndecl);
     }
   if (fcode >= S390_OVERLOADED_BUILTIN_VAR_OFFSET
       && fcode < S390_ALL_BUILTIN_MAX)