libgloss: cris: Correct lcrt0.c for C23

GCC commit r15-5326-gf242f79b8afe defaults to -std=gnu23, and in C23
void foo() means void foo(void), so old-style prototypes now get a
compilation error:

/x/libgloss/cris/lcrt0.c:107:1: error: conflicting types for 'start1';\
 have 'void(int,  char **, char **)'
  107 | start1 (int argc, char **argv, char **env)
      | ^~~~~~
/x/libgloss/cris/lcrt0.c:105:13: note: previous declaration of 'start1\
' with type 'void(void)'
  105 | static void start1 () __asm__ ("__start1") __attribute ((__use\
d__));

Fix by providing a full prototype.
This commit is contained in:
Hans-Peter Nilsson 2024-11-17 04:31:42 +01:00 committed by Hans-Peter Nilsson
parent 1e8c92e21d
commit 9da0ac4051
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* Support for cris*-axis-linux-gnu and src/sim/cris simulator.
Copyright (C) 2000-2005, 2017, 2023 Axis Communications.
Copyright (C) 2000-2005, 2017, 2023, 2024 Axis Communications.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@ -102,7 +102,7 @@ extern void __init__start (void) __attribute ((weak));
extern void __aout__ctors (void) __attribute ((weak));
extern int main (int argc, char **argv, char **env);
static void start1 () __asm__ ("__start1") __attribute ((__used__));
static void start1 (int, char **, char **) __asm__ ("__start1") __attribute ((__used__));
static void
start1 (int argc, char **argv, char **env)
{