No, it is legal. 5.7(4) – one paragraph before your quote – says: “For the purposes of these operators, a pointer to a nonarray object behaves the same as a pointer to the
first element of an array of length one with the type of the object as its element type.”
More Related Contents:
- C/C++: Pointer Arithmetic
- Avoid memory leaks in C++ Pointers [closed]
- Difference between list<Observer*>* and list<Observer*> in C++ [closed]
- When were pointers added to C / C++? [closed]
- Odd error: ‘FILE *’ differs in levels of indirection from ‘FILE’ [closed]
- Is it a good idea to typedef pointers?
- Function does not change passed pointer C++
- Why use pointers? [closed]
- Why are references not reseatable in C++
- how does the ampersand(&) sign work in c++? [duplicate]
- Conversion of pointer-to-pointer between derived and base classes?
- What is the default constructor for C++ pointer?
- What is the use of intptr_t?
- Is Pointer-to- ” inner struct” member forbidden?
- What is a void pointer and what is a null pointer?
- Order of operations for dereference and bracket-ref in C
- can’t modify char* – Memory access violation
- c++ delete pointer issue, can still access data [closed]
- Why doesn’t reference-to-member exist in C++?
- Using a C string gives a warning: “Address of stack memory associated with local variable returned”
- Why does pointer to int convert to void* but pointer to function convert to bool?
- Get base address of process
- Why do linked lists use pointers instead of storing nodes inside of nodes
- Why do some people prefer “T const&” over “const T&”?
- how do arrays work internally in c/c++
- Understanding -Weffc++
- Why is a c++ reference considered safer than a pointer?
- Safety of casting between pointers of two identical classes?
- How can a char pointer be initialized with a string (Array of characters) but an int pointer not with an array of integer? [duplicate]
- Does ‘auto’ type assignments of a pointer in c++11 require ‘*’?