Re: segfault on strtok
From: pete (pfiland_at_mindspring.com)
Date: 10/24/03
- Next message: Andreas Kahari: "Re: segfault on strtok"
- Previous message: Andreas Kahari: "Re: segfault on strtok"
- In reply to: Andreas Kahari: "Re: segfault on strtok"
- Next in thread: Andreas Kahari: "Re: segfault on strtok"
- Reply: Andreas Kahari: "Re: segfault on strtok"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Oct 2003 12:51:17 GMT
Andreas Kahari wrote:
>
> In article <3F9912C6.1399@mindspring.com>, pete wrote:
> > Andreas Kahari wrote:
> >
> >> Yes, the integer zero is a null pointer, but only if it's cast
> >> to void * and converted into a pointer type.
> >
> > A constant expression with a value of zero,
> > is called a "null pointer constant"
> > (you can find that phrase in the standard),
> > whther or not it's cast to (void*).
>
> I was looking at the standard when I wrote it. It says that an
> integer which is zero is a null pointer constant if cast to void *.
> That null pointer constant is a null pointer if converted to
> a pointer type.
I read it differently from the way that you do.
N869
6.3.2.3 Pointers
[#3]
An integer constant expression with the value 0,
or such an expression cast to type void *,
is called a null pointer constant.
-- pete
- Next message: Andreas Kahari: "Re: segfault on strtok"
- Previous message: Andreas Kahari: "Re: segfault on strtok"
- In reply to: Andreas Kahari: "Re: segfault on strtok"
- Next in thread: Andreas Kahari: "Re: segfault on strtok"
- Reply: Andreas Kahari: "Re: segfault on strtok"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|