Topic: Dereferencing null pointers - where described?


Author: "William M. Miller" <wmmiller@MailAndNews.com>
Date: Wed, 14 Mar 2001 13:34:57 GMT
Raw View
>===== Original Message From Albrecht Fritzsche
<albrecht.fritzsche@alfabet.de>
=====
>Hi,
>
>in 1.9 Program Execution, there is the following statement (/4)
>
> "Certain other operations are described in this International
>  Standard as undefined (for example, the effect of dereferencing
>  the null pointer)."
>
>Could someone please tell me, where this description actually is?

I'm not sure what you're asking.  If you search through the Standard
for the word "undefined", you'll find numerous places where the
effect of some construct or of using certain values with particular
operations is declared to be undefined behavior.  There's no single
place where all the various things that lead to undefined behavior
are listed together.

On the other hand, if you're asking about where dereferencing a null
pointer in particular is specified to be underfined behavior, it's
not clear that there is such a place.  There's an open issue on this
question; you can read the discussion about it at
http://www.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#232.

-- William M. Miller

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: Albrecht Fritzsche <albrecht.fritzsche@alfabet.de>
Date: Thu, 15 Mar 2001 18:43:05 GMT
Raw View
"William M. Miller" wrote:
> I'm not sure what you're asking.  ...
> On the other hand, if you're asking about where dereferencing a null
> pointer in particular is specified to be underfined behavior, it's
> not clear that there is such a place.  There's an open issue on this
> question; you can read the discussion about it at
> http://www.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#232.

Thanks a lot,

that's exactly what I was intended to ask, your second guess was
right:-)
I was looking for a confirmative description like

   The indirection through a null pointer is undefined

but haven't thought that such a "basic" thing could be an open issue.
Hence I thought that just I am not able to find it by myself and posted
this obviously kinda inaccurate question.

Thanks again
Ali
--
Albrecht Fritzsche, Software Developer
alfabet meta-modeling AG,
leibnizstr. 53, 10629 berlin, germany
http://www.alfabet.de

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: Albrecht Fritzsche <albrecht.fritzsche@alfabet.de>
Date: Tue, 13 Mar 2001 18:52:50 GMT
Raw View
Hi,

in 1.9 Program Execution, there is the following statement (/4)

 "Certain other operations are described in this International
  Standard as undefined (for example, the effect of dereferencing
  the null pointer)."

Could someone please tell me, where this description actually is?

Thanks
Ali
--
Albrecht Fritzsche, Software Developer
alfabet meta-modeling AG,
leibnizstr. 53, 10629 berlin, germany
http://www.alfabet.de

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: "Andrea Ferro" <AndreaF@UrkaDVD.it>
Date: Wed, 14 Mar 2001 00:59:54 GMT
Raw View
"Albrecht Fritzsche" <albrecht.fritzsche@alfabet.de> wrote in message
news:3AAE113A.E5E1B74A@alfabet.de...
> Hi,
>
> in 1.9 Program Execution, there is the following statement (/4)
>
>  "Certain other operations are described in this International
>   Standard as undefined (for example, the effect of dereferencing
>   the null pointer)."
>
> Could someone please tell me, where this description actually is?
>

You answered yourself!
It's in the standard document at chapter 1.9 (titled "Program Execution" and
tagged [intro.execution]) at paragraph 4


Andrea Ferro

---------
Brainbench C++ Master. Scored higher than 97% of previous takers
Scores: Overall 4.46, Conceptual 5.0, Problem-Solving 5.0
More info http://www.brainbench.com/transcript.jsp?pid=2522556



---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: look@sig.please.because.this.is.invalid.bhp.com.au (Chris Kuan)
Date: Wed, 14 Mar 2001 01:00:23 GMT
Raw View
albrecht.fritzsche@alfabet.de (Albrecht Fritzsche) wrote in comp.std.c++:

>in 1.9 Program Execution, there is the following statement (/4)
>
> "Certain other operations are described in this International
>  Standard as undefined (for example, the effect of dereferencing
>  the null pointer)."
>
>Could someone please tell me, where this description actually is?

1.3.12 "undefined behaviour"

--
Chris Kuan, CSC (Australia)
Concatenate for email: mr gazpacho @ hotmail . com

"Law is a repository for the aimlessly clever" - Tim Freedman

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]