Re: Inconsistent Program Results



In article <1173235295.638208.69780@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
"Peter Nilsson" <airia@xxxxxxxxxxx> wrote:

"D. Power" <pow...@xxxxxxxxxx> wrote:
Francine.Ne...@xxxxxxxxxxxxxx wrote:
...
char *s, *restrict;
...
By the way, restrict is a type qualifier in C,

It's a qualifier in C99, but not in C90.

I see, thank you for that clarification.

so it's probably not a good name for a variable.

It's the fact that it's a keyword in C99 that makes it
unavailable for use as an ordinary identifier (in C99,)
rather than being a type qualifier per se.

free(s), s=restrict=0;

If you want to set these pointers to NULL, say so.

He did. ;-)

It's a style issue, as is using the comma operator rather
than separate statements.

Yes, I should have been clearer on that point.
[snip]
.



Relevant Pages

  • Re: Inconsistent Program Results
    ... By the way, restrict is a type qualifier in C, ... It's a qualifier in C99, ... the cast to char * is unnecessary and can mask failure to ...
    (comp.lang.c)
  • Re: So what Standard are we working off?
    ... as widespread as C90, why would anyone use it if they need ... Having everybody agree on "restrict" ... meant a C99 program using "restrict" would not compile with a C90 ...
    (comp.lang.c)
  • Re: So what Standard are we working off?
    ... compiled by a C99 compiler? ... Actually this is not a compiler question ... In C90 I wouldn't be using restrict nor inline. ...
    (comp.lang.c)
  • Re: __restrict__ vs __restrict ?
    ... > DO>Such code isn't portable to C99, which is still a goal of ours. ... > perfectly ok to use restrict as a name there. ... of older C++ code when new reserved words were added. ... to move forward to the modern world. ...
    (freebsd-hackers)
  • Re: So what Standard are we working off?
    ... compiled by a C99 compiler? ... Actually this is not a compiler question ... In C90 I wouldn't be using restrict nor inline. ...
    (comp.lang.c)