Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gcc15 for openSUSE:Factory checked 
in at 2026-02-20 17:40:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcc15 (Old)
 and      /work/SRC/openSUSE:Factory/.gcc15.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gcc15"

Fri Feb 20 17:40:29 2026 rev:20 rq:1333776 version:15.2.1+git10776

Changes:
--------
--- /work/SRC/openSUSE:Factory/gcc15/gcc15.changes      2026-02-05 
17:56:31.785861724 +0100
+++ /work/SRC/openSUSE:Factory/.gcc15.new.1977/gcc15.changes    2026-02-20 
17:40:55.527138832 +0100
@@ -1,0 +2,12 @@
+Tue Feb 17 12:05:54 UTC 2026 - Richard Biener <[email protected]>
+
+- Add gcc15-Wtime_t-conversion.patch, SUSE-local
+  -Wtime_t-conversion.  [jsc#PED-15601] 
+
+-------------------------------------------------------------------
+Mon Feb  9 12:03:44 UTC 2026 - JS <[email protected]>
+
+- Remove loongarch64 from quadmath_arch. On LoongArch long double
+  is IEEE quad, so libquadmath is not needed and no longer built.
+
+-------------------------------------------------------------------

New:
----
  gcc15-Wtime_t-conversion.patch

----------(New B)----------
  New:
- Add gcc15-Wtime_t-conversion.patch, SUSE-local
  -Wtime_t-conversion.  [jsc#PED-15601] 
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cross-aarch64-gcc15-bootstrap.spec ++++++
--- /var/tmp/diff_new_pack.viAPKP/_old  2026-02-20 17:40:57.523222013 +0100
+++ /var/tmp/diff_new_pack.viAPKP/_new  2026-02-20 17:40:57.527222180 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cross-aarch64-gcc15-bootstrap
 #
-# Copyright (c) 2026 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -126,6 +126,7 @@
 Patch19:        gcc11-gdwarf-4-default.patch
 Patch20:        gcc15-bsc1253043.patch
 Patch21:        gcc15-pr120424.patch
+Patch22:        gcc15-Wtime_t-conversion.patch
 # A set of patches from the RH srpm
 Patch51:        gcc41-ppc32-retaddr.patch
 # Some patches taken from Debian
@@ -333,7 +334,7 @@
 %patch -p1 -P 19
 %patch -p1 -P 20
 %endif
-%patch -p1 -P 21
+%patch -p1 -P 21 -P 22
 %patch -P 51
 %patch -p1 -P 60 -P 61
 

cross-aarch64-gcc15.spec: same change
cross-amdgcn-gcc15.spec: same change
cross-arm-gcc15.spec: same change
cross-arm-none-gcc15-bootstrap.spec: same change
cross-arm-none-gcc15.spec: same change
cross-avr-gcc15-bootstrap.spec: same change
cross-avr-gcc15.spec: same change
cross-bpf-gcc15.spec: same change
cross-hppa-gcc15-bootstrap.spec: same change
cross-hppa-gcc15.spec: same change
cross-loongarch64-gcc15-bootstrap.spec: same change
cross-loongarch64-gcc15.spec: same change
cross-nvptx-gcc15.spec: same change
cross-ppc64-gcc15.spec: same change
cross-ppc64le-gcc15-bootstrap.spec: same change
cross-ppc64le-gcc15.spec: same change
cross-pru-gcc15-bootstrap.spec: same change
cross-pru-gcc15.spec: same change
cross-riscv64-elf-gcc15-bootstrap.spec: same change
cross-riscv64-elf-gcc15.spec: same change
cross-riscv64-gcc15-bootstrap.spec: same change
cross-riscv64-gcc15.spec: same change
cross-rx-gcc15-bootstrap.spec: same change
cross-rx-gcc15.spec: same change
cross-s390x-gcc15-bootstrap.spec: same change
cross-s390x-gcc15.spec: same change
cross-x86_64-gcc15.spec: same change
++++++ gcc15-testresults.spec ++++++
--- /var/tmp/diff_new_pack.viAPKP/_old  2026-02-20 17:40:58.759273522 +0100
+++ /var/tmp/diff_new_pack.viAPKP/_new  2026-02-20 17:40:58.759273522 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gcc15-testresults
 #
-# Copyright (c) 2026 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -64,7 +64,7 @@
 %define build_ada 0
 %endif
 
-%define quadmath_arch %ix86 x86_64 ia64 ppc64le loongarch64
+%define quadmath_arch %ix86 x86_64 ia64 ppc64le
 %define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 
loongarch64
 %define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm 
aarch64 riscv64 loongarch64
 %define hwasan_arch aarch64 x86_64
@@ -408,6 +408,7 @@
 Patch19:        gcc11-gdwarf-4-default.patch
 Patch20:        gcc15-bsc1253043.patch
 Patch21:        gcc15-pr120424.patch
+Patch22:        gcc15-Wtime_t-conversion.patch
 # A set of patches from the RH srpm
 Patch51:        gcc41-ppc32-retaddr.patch
 # Some patches taken from Debian
@@ -541,7 +542,7 @@
 %patch -p1 -P 19
 %patch -p1 -P 20
 %endif
-%patch -p1 -P 21
+%patch -p1 -P 21 -P 22
 %patch -P 51
 %patch -p1 -P 60 -P 61
 

++++++ gcc15.spec ++++++
--- /var/tmp/diff_new_pack.viAPKP/_old  2026-02-20 17:40:58.815275856 +0100
+++ /var/tmp/diff_new_pack.viAPKP/_new  2026-02-20 17:40:58.823276189 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gcc15
 #
-# Copyright (c) 2026 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -43,7 +43,7 @@
 %define build_ada 0
 %endif
 
-%define quadmath_arch %ix86 x86_64 ia64 ppc64le loongarch64
+%define quadmath_arch %ix86 x86_64 ia64 ppc64le
 %define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 
loongarch64
 %define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm 
aarch64 riscv64 loongarch64
 %define hwasan_arch aarch64 x86_64
@@ -387,6 +387,7 @@
 Patch19:        gcc11-gdwarf-4-default.patch
 Patch20:        gcc15-bsc1253043.patch
 Patch21:        gcc15-pr120424.patch
+Patch22:        gcc15-Wtime_t-conversion.patch
 # A set of patches from the RH srpm
 Patch51:        gcc41-ppc32-retaddr.patch
 # Some patches taken from Debian
@@ -2480,7 +2481,7 @@
 %patch -p1 -P 19
 %patch -p1 -P 20
 %endif
-%patch -p1 -P 21
+%patch -p1 -P 21 -P 22
 %patch -P 51
 %patch -p1 -P 60 -P 61
 

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.viAPKP/_old  2026-02-20 17:40:58.943281190 +0100
+++ /var/tmp/diff_new_pack.viAPKP/_new  2026-02-20 17:40:58.951281523 +0100
@@ -1,5 +1,5 @@
-mtime: 1770048877
-commit: 3e0772bd57963fbc2ab60aef307f8e0b21fb902479a2af41d3ab9949d7f05a8f
+mtime: 1771422420
+commit: ac90145de764f03c22860d05f8b917a8bd7002b85f9637ef033afd983f189181
 url: https://src.opensuse.org/gcc/gcc15.git
 revision: main
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-02-18 14:47:20.000000000 +0100
@@ -0,0 +1 @@
+.osc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pre_checkin.sh new/pre_checkin.sh
--- old/pre_checkin.sh  1970-01-01 01:00:00.000000000 +0100
+++ new/pre_checkin.sh  2026-02-18 14:47:20.000000000 +0100
@@ -0,0 +1,31 @@
+#!/bin/bash
+# This script is called automatically during autobuild checkin.
+
+case $0 in
+  \./*)
+    here=$PWD
+    ;;
+  */*)
+    here=${0%/*}
+    ;;
+  *)
+    here=$PWD
+    ;;
+esac
+case ${here##*/} in
+  gcc*.*)
+    # Handle maintainance projects with .$REPO suffix
+    suffix=${here##*/}
+    suffix=${suffix%%\.*}
+    set ${suffix#gcc}
+    ;;
+  gcc-*)
+    suffix=${here##*/}
+    set ${suffix#*-}-
+    ;;
+  gcc[0-9]*)
+    suffix=${here##*/}
+    set ${suffix#gcc}
+    ;;
+esac
+. ${here}/change_spec

++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.viAPKP/_old  2026-02-20 17:40:59.355298359 +0100
+++ /var/tmp/diff_new_pack.viAPKP/_new  2026-02-20 17:40:59.359298526 +0100
@@ -44,7 +44,7 @@
 %define build_ada 0
 %endif
 
-%define quadmath_arch %ix86 x86_64 ia64 ppc64le loongarch64
+%define quadmath_arch %ix86 x86_64 ia64 ppc64le
 %define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 
loongarch64
 %define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm 
aarch64 riscv64 loongarch64
 %define hwasan_arch aarch64 x86_64
@@ -392,6 +392,7 @@
 Patch19:       gcc11-gdwarf-4-default.patch
 Patch20:       gcc15-bsc1253043.patch
 Patch21:       gcc15-pr120424.patch
+Patch22:       gcc15-Wtime_t-conversion.patch
 # A set of patches from the RH srpm
 Patch51:       gcc41-ppc32-retaddr.patch
 # Some patches taken from Debian
@@ -1399,7 +1400,7 @@
 %patch -p1 -P 19
 %patch -p1 -P 20
 %endif
-%patch -p1 -P 21
+%patch -p1 -P 21 -P 22
 %patch -P 51
 %patch -p1 -P 60 -P 61
 

++++++ gcc15-Wtime_t-conversion.patch ++++++
>From a95f47d38935765a38c65ee7ddda73ff7b438979 Mon Sep 17 00:00:00 2001
From: Richard Biener <[email protected]>
Date: Thu, 26 Jun 2025 10:14:54 +0200
Subject: [PATCH] c/96570 - diagnostics for conversions to/from time_t
To: [email protected]

The following prototypes diagnostics for conversions to/from time_t
where the source/destination does not have sufficient precision for it.
I've lumped this into a new -Wtime_t-conversion for the moment and
didn't bother fixing up the testcase for !ilp32.

This does not diagnose time_t to long conversion on 64bit long
platforms (in anticipation of a problem with -m32), so actual audits
would need to build for 32bit long targets and with 64bit time_t.

The alternative is to implement this with 64bit time_t in mind
(even when it's actually 32bit) and base it solely on types
that would be safe on targets.  This get's hard for long vs.
long long then, esp. if typedefs are involved.

Any known problematic constructs out in the wild we'd like to
have test coverage for?

Thanks,
Richard.

        PR c/96570
gcc/
        * doc/invoke.texi (Wtime_t-conversion): Document.

gcc/c-family/
        * c.opt (Wtime_t-conversion): New flag.
        * c-warn.cc (is_time_t): New.
        (warnings_for_convert_and_check): When not otherwise diagnosed
        diagnose conversions to/from time_t and loss/lack of precision.

        * c-c++-common/Wtime_t-1.c: New testcase.
---
 gcc/c-family/c-warn.cc                 | 30 +++++++++-
 gcc/c-family/c.opt                     |  4 ++
 gcc/doc/invoke.texi                    |  6 ++
 gcc/testsuite/c-c++-common/Wtime_t-1.c | 83 ++++++++++++++++++++++++++
 4 files changed, 122 insertions(+), 1 deletion(-)
 create mode 100644 gcc/testsuite/c-c++-common/Wtime_t-1.c

diff --git a/gcc/c-family/c-warn.cc b/gcc/c-family/c-warn.cc
index d547b08f55d..0ee86a65e88 100644
--- a/gcc/c-family/c-warn.cc
+++ b/gcc/c-family/c-warn.cc
@@ -1394,6 +1394,17 @@ conversion_warning (location_t loc, tree type, tree 
expr, tree result)
   return false;
 }
 
+static bool
+is_time_t (tree type)
+{
+  tree name = TYPE_NAME (type);
+  if (name
+      && TREE_CODE (name) == TYPE_DECL
+      && strcmp (IDENTIFIER_POINTER (DECL_NAME (name)), "time_t") == 0)
+    return true;
+  return false;
+}
+
 /* Produce warnings after a conversion. RESULT is the result of
    converting EXPR to TYPE.  This is a helper function for
    convert_and_check and cp_convert_and_check.  */
@@ -1506,7 +1517,24 @@ warnings_for_convert_and_check (location_t loc, tree 
type, tree expr,
                    exprtype, type, expr);
     }
   else
-    conversion_warning (loc, type, expr, result);
+    {
+      if (conversion_warning (loc, type, expr, result))
+       return;
+
+      if (TREE_CODE (result) == INTEGER_CST)
+       ;
+      else if (is_time_t (TREE_TYPE (expr))
+              && INTEGRAL_TYPE_P (type)
+              && TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (expr)))
+       warning_at (loc, OPT_Wtime_t_conversion,
+                   "conversion from %<time_t%> to %qT loses precision", type);
+      else if (is_time_t (type)
+              && INTEGRAL_TYPE_P (TREE_TYPE (expr))
+              && TYPE_PRECISION (type) > TYPE_PRECISION (TREE_TYPE (expr)))
+       warning_at (loc, OPT_Wtime_t_conversion,
+                   "source %qE of conversion to %<time_t%> lacks precision",
+                   expr);
+    }
 }
 
 /* Subroutines of c_do_switch_warnings, called via splay_tree_foreach.
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 75b6531860e..c94a1e32ec8 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -589,6 +589,10 @@ Wconversion-null
 C++ ObjC++ Var(warn_conversion_null) Init(1) Warning
 Warn for converting NULL from/to a non-pointer type.
 
+Wtime_t-conversion
+C ObjC C++ ObjC++ Var(warn_time_t_conversion) Warning
+Warn for conversions to or from time_t that are not 64bit clean.
+
 Wcpp
 C ObjC C++ ObjC++ CppReason(CPP_W_WARNING_DIRECTIVE)
 ; Documented in common.opt
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index e7af79e09ae..a40b47c870d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9725,6 +9725,12 @@ unsigned integers are disabled by default in C++ unless
 Warnings about conversion from arithmetic on a small type back to that
 type are only given with @option{-Warith-conversion}.
 
+@opindex Wtime_t-conversion
+@opindex Wno-time_t-conversion
+@item -Wconversion
+Warn for conversions to or from @code{time_t} that are not able to
+carry the whole 64bit value range.
+
 @opindex Wdangling-else
 @opindex Wno-dangling-else
 @item -Wdangling-else
diff --git a/gcc/testsuite/c-c++-common/Wtime_t-1.c 
b/gcc/testsuite/c-c++-common/Wtime_t-1.c
new file mode 100644
index 00000000000..8193bd3d01f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wtime_t-1.c
@@ -0,0 +1,83 @@
+/* Test for diagnostics for conversions between time_t and integer types
+   These tests are based on gcc.dg/Wconversion-integer.c   */
+
+/* { dg-do compile { target ilp32 } } */
+/* { dg-options "-std=c99 -fsigned-char -Wtime_t-conversion" } */
+
+#define __USE_TIME_BITS64
+#include <time.h>
+
+void fsc (signed char sc);
+void fuc (unsigned char uc);
+unsigned fui (unsigned int  ui);
+int fsi (signed int si);
+unsigned long ful (unsigned long  ul);
+signed long fsl (signed long  sl);
+time_t ft(time_t t);
+
+void h (int x)
+{
+  unsigned char uc = 3;
+  signed char   sc = 3;
+  unsigned short us = 3;
+  signed short   ss = 3;
+  unsigned int ui = 3;
+  signed int   si = 3;
+  unsigned long int ul = 3;
+  signed long int   sl = 3;
+  unsigned long long int ull = 3;
+  signed long long int   sll = 3;
+  time_t t = 3;
+  time_t t2 = -3;
+
+  uc = t; /* { dg-warning "conversion" } */
+  sc = t; /* { dg-warning "conversion" } */
+  us = t; /* { dg-warning "conversion" } */
+  ss = t; /* { dg-warning "conversion" } */
+  si = t; /* { dg-warning "conversion" } */
+  ui = t; /* { dg-warning "conversion" } */
+  sl = t; /* { dg-warning "conversion" } */
+  ul = t; /* { dg-warning "conversion" } */
+  ull = t; /* { dg-warning "sign" } */
+  t = uc; /* { dg-warning "conversion" } */
+  t = sc; /* { dg-warning "conversion" } */
+  t = si; /* { dg-warning "conversion" } */
+  t = ui; /* { dg-warning "conversion" } */
+  t = sl; /* { dg-warning "conversion" } */
+  t = ul; /* { dg-warning "conversion" } */
+  fuc (t); /* { dg-warning "conversion" } */
+  fuc (t); /* { dg-warning "conversion" } */
+  fsc (t); /* { dg-warning "conversion" } */
+  fsc (t); /* { dg-warning "conversion" } */
+  si = ft(t); /* { dg-warning "conversion" } */
+  ui = ft(t); /* { dg-warning "conversion" } */
+  sl = ft(t); /* { dg-warning "conversion" } */
+  ul = ft(t); /* { dg-warning "conversion" } */
+  ful(t);     /* { dg-warning "conversion" } */
+  fsl(t);     /* { dg-warning "conversion" } */
+  t = fsi(si); /* { dg-warning "conversion" } */
+  t = fui(ui); /* { dg-warning "conversion" } */
+  t = fsl(sl); /* { dg-warning "conversion" } */
+  t = ful(sl); /* { dg-warning "conversion" } */
+  ull = ft(t); /* { dg-warning "sign" } */
+
+  fsi (t); /* { dg-warning "sign" } */
+  fui (t); /* { dg-warning "sign" } */
+  fsi (t); /* { dg-warning "conversion" } */
+  t = ft(t);
+  sll = ft(t);
+  ft(sll);
+  t2 = t;
+  sll = t;
+  t = sll;
+  si = (int)t;
+  ui = (unsigned)t;
+  sl = (long)t;
+  ul = (unsigned long)t;
+  ull = (unsigned long long)t;
+  t = (time_t)si;
+  t = (time_t)ui;
+  t = (time_t)sl;
+  t = (time_t)ul;
+  t = (time_t)ull;
+}
-- 
2.51.0

Reply via email to