public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: newlib@sourceware.org
Subject: Re: newlib header breaks restricted pointers in C++
Date: Fri, 28 Jul 2023 09:42:49 -0500	[thread overview]
Message-ID: <CAF9ehCWVwUHCb9chK1DuEPZ1oEYJUDJW795dNzBLGL8Vw3riOg@mail.gmail.com> (raw)
In-Reply-To: <b104f1c6-9012-5e7d-50cb-7003f1dec472@embedded-brains.de>

[-- Attachment #1: Type: text/plain, Size: 1878 bytes --]

On Fri, Jul 28, 2023 at 9:15 AM Sebastian Huber <
sebastian.huber@embedded-brains.de> wrote:

>
>
> On 27.07.23 11:00, Corinna Vinschen wrote:
> > Let's compare with the GLibc version:
> >
> >    /* __restrict is known in EGCS 1.2 and above, and in clang.
> >       It works also in C++ mode (outside of arrays), but only when
> spelled
> >       as '__restrict', not 'restrict'.  */
> >    #if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
> >    # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
> >    #  define __restrict    restrict
> >    # else
> >    #  define __restrict    /* Ignore */
> >    # endif
> >    #endif
> >
> > So the expression is the same, just the version check makes more sense.
> >
> > Shall we match our version expression to the GLibc expression?
>
> Yes, this makes sense. However, do we care about GCC < 2.92 and clang < 3?
>

I recently tried to build a variety of old gcc and clang versions for some
experiments
and failed to go back that far building Linux compilers. I am sure there
are old toolchains
out there with gcc that old but they should stick with an older newlib.

GCC 2.95.3 was released on March 16, 2001. The base 2.95 release was in
July 1999.

This should be well before GCC supported C99.

I'd be prone to add #error if the version doesn't meet a floor version. But
that's just my
opinion.

--joel

>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber@embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>

  reply	other threads:[~2023-07-28 14:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 22:23 Bruno De Fraine
2023-07-25 17:35 ` Corinna Vinschen
2023-07-25 17:46   ` Sebastian Huber
2023-07-25 18:48     ` Corinna Vinschen
2023-07-25 23:48       ` Steven J Abner
2023-07-27  9:00         ` Corinna Vinschen
2023-07-28 14:15           ` Sebastian Huber
2023-07-28 14:42             ` Joel Sherrill [this message]
2023-07-31 11:04       ` Bruno De Fraine

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=CAF9ehCWVwUHCb9chK1DuEPZ1oEYJUDJW795dNzBLGL8Vw3riOg@mail.gmail.com \
    --to=joel@rtems.org \
    --cc=newlib@sourceware.org \
    --cc=sebastian.huber@embedded-brains.de \
    /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).