<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[MISRA Discussion Forums - 4.8 Expressions]]></title>
		<link>https://forum.misra.org.uk/</link>
		<description><![CDATA[MISRA Discussion Forums - https://forum.misra.org.uk]]></description>
		<pubDate>Thu, 12 Nov 2026 23:21:40 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Rule 8.2.8 - why aren't aliases allowed?]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1732</link>
			<pubDate>Tue, 18 Mar 2025 13:19:15 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5614">cgpzs</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1732</guid>
			<description><![CDATA[The rule provides this example as Non-Compliant:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>    using hashPtr_t = std::uintptr_t;<br />
    auto p2 = reinterpret_cast&lt; hashPtr_t &gt;( s );  // Non-compliant</code></div></div><br />
However, there's nowhere in the Rule Text, Rationale or Amplification that explains why aliases are not allowed. Can you clarify?<br />
<br />
Aliases are good for removing code duplication and ensuring the correct type is used in all contexts where it's needed; having to remove the alias and spell std::uintptr_t everywhere hurts code readability and maintainability, without any clear benefit.<br />
<br />
Static analyzers can easily detect the usage of std::uintptr_t even if it's behind an alias.]]></description>
			<content:encoded><![CDATA[The rule provides this example as Non-Compliant:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>    using hashPtr_t = std::uintptr_t;<br />
    auto p2 = reinterpret_cast&lt; hashPtr_t &gt;( s );  // Non-compliant</code></div></div><br />
However, there's nowhere in the Rule Text, Rationale or Amplification that explains why aliases are not allowed. Can you clarify?<br />
<br />
Aliases are good for removing code duplication and ensuring the correct type is used in all contexts where it's needed; having to remove the alias and spell std::uintptr_t everywhere hurts code readability and maintainability, without any clear benefit.<br />
<br />
Static analyzers can easily detect the usage of std::uintptr_t even if it's behind an alias.]]></content:encoded>
		</item>
	</channel>
</rss>