Re: newlib header breaks restricted pointers in C++

Sebastian Huber <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>

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?

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: [email protected]
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.