评论:由Mailcrypt处理3.5.8< http://mailcrypt.sourceforge.net/> iD8DBQFCjOFQVcFcaSW / uEgRAu + aAKDDQqLP5PeBpB4RHt2Wn8bGN4lEXwCfQa4U MDJleeQZG8u63b7TJZExNog = = XMLL ----- END PGP SIGNATURE ----- 正确 - 没有什么标准。 - a签名 Hello, What is equivalent of __unaligned attribute in GNU C?I''ve searched for some time and it seems that it just does not exist... /*For HP and new Microsoft compilers it works this way:long_pointer = (some unaligned address)long_value = (* (__unaligned long *) long_pointer ); This causes the compiler to emit code that gets the valuein some slow but sure way, but avoiding exceptions*/ No need to suggest workarounds please... Regards--PA 解决方案 It appears not to. That''s probably because it should not be neededunless your code is buggy. If your code is standard C, the compilershould have aligned everything nicely for you. However, you didn''tpost the code that creates the unaligned pointer. Also:- - Some CPUs allow unaligned access.- - Some operating systems can transparently handle unaligned access onsystems that don''t support it.- --Roger LeighPrinting on GNU/Linux? http://gimp-print.sourceforge.net/Debian GNU/Linux http://www.debian.org/GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.4.1 (GNU/Linux)Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> iD8DBQFCjOFQVcFcaSW/uEgRAu+aAKDDQqLP5PeBpB4RHt2Wn8bGN4lEXwCfQa4UMDJleeQZG8u63b7TJZExNog==XMLL-----END PGP SIGNATURE----- correct -- there is nothing standard. --a signature 这篇关于GNU C中是否存在UNALIGNED属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-19 20:47