473,594 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Reading indeterminate pointer -> Ref to Std?

Hi,

in a post from 1995 ('why pass references?') in this group, Steve
Clamage said reading the value of an indeterminate pointer (no
dereferencing taking place) is undefined behavior. While I am in no
doubt about this, I could not find it in the Standard. Apart from the
fact that I did not know where to look, the search function did not turn
up anything useful. Can somebody please provide a page/paragraph number?

Thanks!
--
jb

(reply address in rot13, unscramble first)
Jul 23 '05 #1
1 1255
"Jakob Bieling" <ar************ ****@rot13.com> wrote...
in a post from 1995 ('why pass references?') in this group, Steve
Clamage said reading the value of an indeterminate pointer (no
dereferencing taking place) is undefined behavior. While I am in no doubt
about this, I could not find it in the Standard. Apart from the fact that
I did not know where to look, the search function did not turn up anything
useful. Can somebody please provide a page/paragraph number?


Please search Google Groups for posts containing "access invalid pointer
standard" (without double quotes, of course). 3.7.3.2 says that the effect
of using an invalid pointer value is undefined. Indeterminate value can be
either valid (by chance) or invalid. That doesn't have to be specified in
the Standard to be true. More information on "using an invalid pointer
value" is in the archives.

V
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3368
by: Webster | last post by:
Hello, I have to read a file with a single "command" per line. But how do I read to the end of the line?? I am using C style filepointers (not by choice :( ) Thanks for any help! -- Regards, Webster
19
10292
by: Lionel B | last post by:
Greetings, I need to read (unformatted text) from stdin up to EOF into a char buffer; of course I cannot allocate my buffer until I know how much text is available, and I do not know how much text is available until I have read it... which seems to imply that multiple reads of the input stream will be inevitable. Now I can correctly find the number of characters available by: |
19
2691
by: Holger Hasselbach | last post by:
- The value of the object allocated by the malloc function is used (7.20.3.3). - The value of any bytes in a new object allocated by the realloc function beyond the size of the old object are used (7.20.3.4). Something like this (include and checkings omitted): p = malloc(sizeof(*p) * 5); p = 1; p = 1; p = 1;
3
1991
by: Mantorok Redgormor | last post by:
In this context would an indeterminate value lead down the path to undefined behavior? (void)foo->member; I want to keep my interface consisent in my program so I have this one function which is passed an argument that it doesn't need. So I can only think of using it this way as a viable method
3
1832
by: roaher | last post by:
hi I have some trouble reading this macro: #define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r)))) also consider that SMC_BASE_ADDRESS is address base of I/O mapped peripherial registers, r is register offset. Does that read: return 32bits of data stored in memory location SMC_BASE_ADDRESS+r.
4
3833
by: Henk | last post by:
Hi, I am new to the c-programming language and at the moment I am struggling with the following: I want to read a file using fread() and then put it in to memory. I want to use a (singel) linked list to continousely (dynamically) free up more memory when needed and put the buffers with the data of the file on a sort of stack. The problem is that i have no idea how to do this.
26
4087
by: vlsidesign | last post by:
I am a newbie and going through "The C programming language" by Kernighan & Richie on my own time (I'm not a programmer but I want to learn because it can save me time in my normal job, and it is kind of fun). As I go through the book, I seek to do all the exercises because they are very useful, and good, but it seems like I am just stumbling through somewhat. In particular, I don't really know how to think about "catching errors", or how...
25
5839
by: 7stud | last post by:
I can't break out of the for loop in this example: ------ import sys lst = for line in sys.stdin: lst.append(line) break
0
889
by: veerbala82 | last post by:
Hi, I am having a problem that I have been trying to solve for the last 2 weeks. This might be seen in many travel sites like lastminute.com. The situation is simple. I need an indeterminate progress bar. I enter the search criteria/parameters (From/To Date & Destination) in page ‘A’. I click the search button now. I need to be transferred to Page ‘B’, which is empty but consists of a progress bar like image displaying any message and then I...
11
4043
by: jmnat | last post by:
Hello, Let’s assume the following piece of code : This code works fine, its output is : "Exception : Could not execute f9". Nevertheless, in the catch clause, the pointer c is indeterminate, the pointee may have been lost.
0
7947
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7880
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8255
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8010
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6665
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.