]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin: Fix a narrowing warning.
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 6 Nov 2024 20:46:47 +0000 (20:46 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Wed, 6 Nov 2024 20:49:07 +0000 (20:49 +0000)
cdtor_record needs to have an unsigned entry for the position in order to
match with vec_safe_length.

gcc/ChangeLog:

* config/darwin.cc (cdtor_record): Make position unsigned.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/config/darwin.cc

index ae821e3201211203b2ad4133b1a9cdca7a893811..4e495fce82bb58eaab4e14b03ce8c8ba0da6f51b 100644 (file)
@@ -90,7 +90,7 @@ along with GCC; see the file COPYING3.  If not see
 typedef struct GTY(()) cdtor_record {
   rtx symbol;
   int priority;                /* [con/de]structor priority */
-  int position;                /* original position */
+  unsigned position;   /* original position */
 } cdtor_record;
 
 static GTY(()) vec<cdtor_record, va_gc> *ctors = NULL;