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: "Zack Weinberg" <zack <at> owlfolio.org>
To: 59992 <at> debbugs.gnu.org
Subject: [bug#59992] [PATCH 1/2] tests: Fix 'type defaults' error in link_cond due to main not being properly declared
Date: Thu, 15 Dec 2022 08:16:54 -0500
On Thu, Dec 15, 2022, at 2:12 AM, Frederic Berat wrote:
> For the record:
>
> cat > less.c <<'END'
> /* Valid C but deliberately invalid C++ */
> int main (void)
> {
>   int new = 0;
>   return new;
> }
> END
>
> $> g++ less.c
> less.c: In function ‘int main()’:
> less.c:4:7: error: expected unqualified-id before ‘new’
>     4 |   int new = 0;
>       |       ^~~
> less.c:5:13: error: expected type-specifier before ‘;’ token
>     5 |   return new;
>       |             ^

Thanks, I haven't had time to look this up myself. Please go ahead and commit the patch.

zw




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

Previous Next


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