aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2024-11-17 04:31:42 +0100
committerHans-Peter Nilsson <hp@bitrange.com>2024-11-18 01:02:09 +0100
commit9da0ac405163466bafc404e2335ae7f23309c311 (patch)
treeefb47c63f9863f16efebd1d6c153bb497ea96ad0
parent1e8c92e21d386d2e4a29fa92e8258979ff19ae6b (diff)
downloadnewlib-9da0ac405163466bafc404e2335ae7f23309c311.zip
newlib-9da0ac405163466bafc404e2335ae7f23309c311.tar.gz
newlib-9da0ac405163466bafc404e2335ae7f23309c311.tar.bz2
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.
-rw-r--r--libgloss/cris/lcrt0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgloss/cris/lcrt0.c b/libgloss/cris/lcrt0.c
index 0aae3c2..c140615 100644
--- a/libgloss/cris/lcrt0.c
+++ b/libgloss/cris/lcrt0.c
@@ -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)
{