Re: [PATCH] warnkill trivia 2/2

From: Tomas Szepe (szepe@pinerecords.com)
Date: Sun Sep 01 2002 - 09:56:59 EST


> >i.e. it's impossible to have a constant
> >pointer to a non-constant value w/o using a qualified
> >typedef.
>
> void g(int * const t) { *t = 0; }
>
>
> >W/o a typedef, gcc seems unable to tell the difference
> >between 'const int *' and 'int const *' altogether.
>
> There is no difference. Read the C spec, or Harbison&Steele
> which has had an explanation of 'const' since their '87 2nd Ed.

Ok, that explains it, obviously I (and DaveM :D) didn't know the syntax.
Thanks for the reference!

I'm going to redo the patches.

T.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:14 EST