c++/2519: Bug in the `__restrict' keyword.

lucho@haemimont.bg lucho@haemimont.bg
Mon Apr 9 09:46:00 GMT 2001


>Number:         2519
>Category:       c++
>Synopsis:       Bug in the `__restrict' keyword.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 09 09:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Luchezar Belev
>Release:        GCC-2.95.2; GCC-2.95.3
>Organization:
>Environment:
Linux-2.4.2; Linux-2.2.18
glibc-2.1.92
Pentium III
(all of this doesn't matter - the bug is in the compiler's parser)
>Description:
Consider the next 2 code fragments:

FIRST:
	int * __restrict p;

SECOND:
	typedef int * pint;
	pint __restrict p;

 I think they both should compile in the same way,
but that's not the case. The c++ compiler rejects the second one
with error `two or more data types in declaration of `p''

 The c compiler does the right thing - makes no difference
between both fragments (exept, of course, that the second
one defines one extra symbol - `pint')
>How-To-Repeat:
see the description (it's simple enough, really)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list