This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to implement `restrict' in C
- To: law at cygnus dot com
- Subject: Re: PATCH to implement `restrict' in C
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Wed, 21 Oct 1998 09:23:14 +0100
- CC: Andi Kleen <ak at muc dot de>, mark at markmitchell dot com, egcs-patches at cygnus dot com
- Organization: Computer Science Dept, Bristol University
- References: <423.908896574@upchuck>
Jeffrey A Law wrote:
>
> In message <k23e8jsb68.fsf@zero.aec.at>you write:
> > There is one problem with that: once restrict is ported to g++ it will
> > need an own option for it. -flang-c9x doesn't make sense for a C++ compiler
> > (and a new C++ standard including it is unlikely to appear anytime soon)
> > So an -frestrict is needed anyways, and it would be inconsistent to have
> > it for g++, but not for gcc. So I propose to keep -frestrict, but to have
> > -flang-c9x imply it.
> Actually I'd prefer "-lang-c9x", not "-flang-c9x". Again, consistency with
> existing language variant options.
Just a thought, should we (eventually) allow g++ to parse C9X header
files? If so, doesn't there need to be some other mechanism to flag
this. `-lang-c++ -lang-c9x' would be a rather stupid way to do it! I
don't think an extern "C9X" { ... } construct would be appropriate, as
that's specifying linkage not syntax. Although -lang-c9x on its own is
sufficient to select C9X flavour C, it's not approriate for a C9X aware
C++ compiler.
> For C++, I would recommend using __restrict__ until it appears in a C++
> standard of some sort.
(and have it always understood? -- no -frestrict flag?) sound's good to
me.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
You can up the bandwidth, but you can't up the speed of light
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk