A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-July/036953.html below:

[Python-Dev] ANSI strict aliasing and Python

[Python-Dev] ANSI strict aliasing and Python [Python-Dev] ANSI strict aliasing and PythonMartin v. Löwis martin@v.loewis.de
19 Jul 2003 13:09:46 +0200
Ben Laurie <ben@algroup.co.uk> writes:

> > So if you convert two pointers to the same PyIntObject to PyObject*,
> > and convert them back, then compare them, you are guaranteed to get
> > true. If you compare them while they are PyObject*, no guarantees are
> > given.
> 
> FWIW, K&R 2nd Ed. says in A6.6 that this is only true if the conversion
> is to a type whose alignment requirement is less or equally strict.

What is "this" in your message? "no guarantees are given", or "you are
guaranteed to get true". If the latter: Sure, but 6.2.5p26 says

# All pointers to structure types shall have the same representation
# and alignment requirements as each other.

So all pointers are equal.

Regards,
Martin



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4