public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libiberty: Fix C89-isms in configure tests
Date: Tue, 18 Oct 2022 16:06:17 +0200	[thread overview]
Message-ID: <875yghjkfa.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <Y06iyyH6erGmYjX3@tucnak> (Jakub Jelinek's message of "Tue, 18 Oct 2022 14:57:47 +0200")

* Jakub Jelinek:

> On Tue, Oct 18, 2022 at 12:05:49PM +0200, Florian Weimer via Gcc-patches wrote:
>> libiberty/
>> 
>> 	* acinclude.m4 (check for working strncmp): Add missing
>> 	int return type and parameter list to the definition of main.
>> 	Include <string.h> for string functions.  Avoid calling
>> 	undeclared exit function.
>>         (stack direction for C alloca): Avoid calling undeclared exit
>>         function.
>
> Spaces instead of tabs.

You mean I should use tabs throughout, right?

> I'd think we should #include <stdlib.h> for exit and keep exit, I vaguely
> remember non-zero return from main doesn't always work reliably, which is
> why e.g. in the testsuite we usually abort instead of return non-zero
> from main.  Don't remember if it is just for some bare metal cases or
> what, which on the either side probably don't have mmap.

Okay, will do that and send a v2.

By the way, the stack direction test currently gives incorrect results
on x86-64 due to -O2 and address comparison of unrelated objects.  I
assume this doesn't matter because we don't use it on compilers that
support alloca natively.

Thanks,
Florian


  reply	other threads:[~2022-10-18 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 10:05 Florian Weimer
2022-10-18 12:57 ` Jakub Jelinek
2022-10-18 14:06   ` Florian Weimer [this message]
2022-10-18 14:08     ` Jakub Jelinek
2022-10-18 14:14       ` Florian Weimer
2022-10-18 14:19         ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yghjkfa.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).