GNU bug report logs - #59992
[PATCH 1/2] tests: Fix 'type defaults' error in link_cond due to main not being properly declared

Previous Next

Package: automake-patches;

Reported by: Frederic Berat <fberat <at> redhat.com>

Date: Mon, 12 Dec 2022 08:44:04 UTC

Severity: wishlist

Tags: patch

Done: Mike Frysinger <vapier <at> gentoo.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Frederic Berat <fberat <at> redhat.com>
To: 59992 <at> debbugs.gnu.org
Cc: Frédéric Bérat <fberat <at> redhat.com>
Subject: [bug#59992] [PATCH v2 1/3] tests: Fix 'type defaults' error in link_cond due to main not being properly declared
Date: Fri, 16 Dec 2022 07:17:17 +0100
From: Frédéric Bérat <fberat <at> redhat.com>

No modifications from v1

-- 8< --

This is related to an effort to prepare Automake for future GCC/Clang
versions which set c99 as default standard to be used.
Not properly declaring main as "int main(...)" is rejected since c99.
---
 t/link_cond.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/link_cond.sh b/t/link_cond.sh
index e7a13b614..533e359e2 100644
--- a/t/link_cond.sh
+++ b/t/link_cond.sh
@@ -52,7 +52,7 @@ $AUTOCONF
 rm -f *.c++
 cat > less.c <<'END'
 /* Valid C but deliberately invalid C++ */
-main ()
+int main (void)
 {
   int new = 0;
   return new;
-- 
2.38.1





This bug report was last modified 2 years and 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.