Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: Performance of unaligned memory-accesses Date: Sat, 10 Aug 2019 17:22:08 -0700 Organization: None to speak of Lines: 13 Message-ID: References: <2tm3F.2462684$ng1.1031546@fx36.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="cb4b2dc0baf4fefc9628bc1b5f7f50df"; logging-data="27227"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185V4YqrRUkkaK+eN0alYJO" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:kUe5+ZdAAZ4IRZH2K1oxFQULUNY= sha1:fdwJUjXA8VyQUSvEdRoedcuc72I= Xref: csiph.com comp.lang.c++:67544 David Brown writes: [...] > The standard says that you can't do unaligned accesses. No, it doesn't. It says that unaligned accesses are undefined behavior. > It is only if a > compiler documents that it allows such accesses that you can use it safely. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */