<?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 - 8.5 Identifers]]></title>
		<link>https://forum.misra.org.uk/</link>
		<description><![CDATA[MISRA Discussion Forums - https://forum.misra.org.uk]]></description>
		<pubDate>Thu, 05 Nov 2026 20:03:06 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Rule 5.7 - Uniqueness of Tags as Identifiers]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1544</link>
			<pubDate>Wed, 01 Jul 2020 15:13:53 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5376">j-nafziger</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1544</guid>
			<description><![CDATA[Hi - <br />
<br />
The amplification in Rule 5.7 says that a tag shall be unique across all name spaces and translation units.<br />
<br />
Should this be read such that:<br />
- A tag shall be unique across (<span style="text-decoration: underline;" class="mycode_u">all tags</span> in) all name spaces and translation units.<br />
- A tag shall be unique across (<span style="text-decoration: underline;" class="mycode_u">all identifiers</span> in) all name spaces and translation units.<br />
<br />
The distinction I am drawing being could a unique identifier of a tag be reused for other non-tag identifiers?<br />
<br />
The examples in Rule 5.7 only show conflicts between tags and do not show conflicts between tags and other kinds of identifiers (labels, members, ordinary identifiers).<br />
<br />
For example is this code violating Rule 5.7 (reuse of 'device' as a member and a tag)?<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>struct clock {<br />
&nbsp;&nbsp;&nbsp;&nbsp;u32&nbsp;&nbsp;&nbsp;&nbsp; device;&nbsp;&nbsp;/* Device is a 'member' */<br />
} ;<br />
struct device;&nbsp;&nbsp;/* device is a tag */</code></div></div><br />
Thanks!]]></description>
			<content:encoded><![CDATA[Hi - <br />
<br />
The amplification in Rule 5.7 says that a tag shall be unique across all name spaces and translation units.<br />
<br />
Should this be read such that:<br />
- A tag shall be unique across (<span style="text-decoration: underline;" class="mycode_u">all tags</span> in) all name spaces and translation units.<br />
- A tag shall be unique across (<span style="text-decoration: underline;" class="mycode_u">all identifiers</span> in) all name spaces and translation units.<br />
<br />
The distinction I am drawing being could a unique identifier of a tag be reused for other non-tag identifiers?<br />
<br />
The examples in Rule 5.7 only show conflicts between tags and do not show conflicts between tags and other kinds of identifiers (labels, members, ordinary identifiers).<br />
<br />
For example is this code violating Rule 5.7 (reuse of 'device' as a member and a tag)?<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>struct clock {<br />
&nbsp;&nbsp;&nbsp;&nbsp;u32&nbsp;&nbsp;&nbsp;&nbsp; device;&nbsp;&nbsp;/* Device is a 'member' */<br />
} ;<br />
struct device;&nbsp;&nbsp;/* device is a tag */</code></div></div><br />
Thanks!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 5.8: identifiers of interest]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1505</link>
			<pubDate>Tue, 03 Sep 2019 20:24:08 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=3240">sca2012</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1505</guid>
			<description><![CDATA[The main goal of rule 5.8 (as well as 5.9), judging from the examples and amplifications, is to ensure that identifiers referring to objects or functions are not confused with the same identifiers that refer to different objects or functions.<br />
<br />
How about identifiers that are reused by do not refer to neither objects nor functions?<br />
<br />
For instance, a struct member:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>int i;<br />
<br />
struct S {<br />
&nbsp;&nbsp;&nbsp;&nbsp;int i;&nbsp;&nbsp;&nbsp;&nbsp;// identifier is reused but cannot actually be confused with the object i at line 1<br />
};</code></div></div>Is this scenario still a violation to the rule?]]></description>
			<content:encoded><![CDATA[The main goal of rule 5.8 (as well as 5.9), judging from the examples and amplifications, is to ensure that identifiers referring to objects or functions are not confused with the same identifiers that refer to different objects or functions.<br />
<br />
How about identifiers that are reused by do not refer to neither objects nor functions?<br />
<br />
For instance, a struct member:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>int i;<br />
<br />
struct S {<br />
&nbsp;&nbsp;&nbsp;&nbsp;int i;&nbsp;&nbsp;&nbsp;&nbsp;// identifier is reused but cannot actually be confused with the object i at line 1<br />
};</code></div></div>Is this scenario still a violation to the rule?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[5.1 in practice]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1426</link>
			<pubDate>Wed, 23 May 2018 09:37:44 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4739">danielmarjamaki</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1426</guid>
			<description><![CDATA[I am not technically against 5.1. I just wonder how useful it is in practice.<br />
<br />
Do you actually know a modern compiler that does not work well?<br />
<br />
If you create a "too long" identifier will the modern compiler misbehave and create wrong code, or will they abort and complain to the user that an identifier is too long?<br />
<br />
I created 2 external variables with 32000 characters and compiled with gcc and it seems to work fine.]]></description>
			<content:encoded><![CDATA[I am not technically against 5.1. I just wonder how useful it is in practice.<br />
<br />
Do you actually know a modern compiler that does not work well?<br />
<br />
If you create a "too long" identifier will the modern compiler misbehave and create wrong code, or will they abort and complain to the user that an identifier is too long?<br />
<br />
I created 2 external variables with 32000 characters and compiled with gcc and it seems to work fine.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 5.6 A ty pedef name shall be a unique identifier]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1422</link>
			<pubDate>Wed, 09 May 2018 07:36:56 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5005">xiaoxin</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1422</guid>
			<description><![CDATA[My doubt about this rule is if they violate rules in different files, as follows.If they violate the rules in the same project.<br />
a.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void func ( void )<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typedef unsigned char u8_t;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></div></div>b.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void func ( void )<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;typedef unsigned char u8_t;<br />
&nbsp;&nbsp;&nbsp;&nbsp;â€¦â€¦<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
}</code></div></div>Similarly, there are rules 5.3  : An identifi er declared in an inner scope shall not hide an identifier declared in an outer scope<br />
c.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>int a =8;</code></div></div>d.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void main(){<br />
int a = 9;<br />
}</code></div></div>In other words, whether cross-document considerations are consideredã€‚<br />
Looking forward to your replyã€‚]]></description>
			<content:encoded><![CDATA[My doubt about this rule is if they violate rules in different files, as follows.If they violate the rules in the same project.<br />
a.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void func ( void )<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typedef unsigned char u8_t;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></div></div>b.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void func ( void )<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;typedef unsigned char u8_t;<br />
&nbsp;&nbsp;&nbsp;&nbsp;â€¦â€¦<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
}</code></div></div>Similarly, there are rules 5.3  : An identifi er declared in an inner scope shall not hide an identifier declared in an outer scope<br />
c.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>int a =8;</code></div></div>d.c<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void main(){<br />
int a = 9;<br />
}</code></div></div>In other words, whether cross-document considerations are consideredã€‚<br />
Looking forward to your replyã€‚]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[In Example suit R_05_01_2.c]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1416</link>
			<pubDate>Tue, 17 Apr 2018 11:15:07 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5013">swasti</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1416</guid>
			<description><![CDATA[In Example suit R_05_01_2.c<br />
Kindly explain why the following code is non-compliant?<br />
int32_t ABC;<br />
int32_t ABC = 0;  /* Non-compliant  */]]></description>
			<content:encoded><![CDATA[In Example suit R_05_01_2.c<br />
Kindly explain why the following code is non-compliant?<br />
int32_t ABC;<br />
int32_t ABC = 0;  /* Non-compliant  */]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Macros with not distinct parameters names: raise rule 5.4?]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1349</link>
			<pubDate>Mon, 12 Jun 2017 13:27:09 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=837">ggoulas</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1349</guid>
			<description><![CDATA[Hi,<br />
<br />
Should the following raise MISRA C:2012 rule 5.4 ?<br />
<br />
#define MACRO(MACRO) MACRO<br />
<br />
and more generally:<br />
#define X123456789_123456789_123456789_AA(X123456789_123456789_123456789_AB) f(X123456789_123456789_123456789_AB)<br />
<br />
I thought that not since there is no confusion when parameters are substituted because the macro is not active.<br />
Is it right?<br />
Many thanks!]]></description>
			<content:encoded><![CDATA[Hi,<br />
<br />
Should the following raise MISRA C:2012 rule 5.4 ?<br />
<br />
#define MACRO(MACRO) MACRO<br />
<br />
and more generally:<br />
#define X123456789_123456789_123456789_AA(X123456789_123456789_123456789_AB) f(X123456789_123456789_123456789_AB)<br />
<br />
I thought that not since there is no confusion when parameters are substituted because the macro is not active.<br />
Is it right?<br />
Many thanks!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[5.9 and static function or global variable]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1347</link>
			<pubDate>Mon, 12 Jun 2017 07:18:14 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4742">xiangke</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1347</guid>
			<description><![CDATA[As we know, static function or global variable has only internal linkage, is invisible for other module,<br />
Why their name can not be defined as same as ones in other translation unit?<br />
For example, below case :<br />
/*tunit1.c*/<br />
static int8_t count;  <br />
static void foo ( void )<br />
{<br />
}<br />
<br />
/*tunit2.c*/<br />
static int8_t count;  <br />
static void foo ( void )<br />
{<br />
}]]></description>
			<content:encoded><![CDATA[As we know, static function or global variable has only internal linkage, is invisible for other module,<br />
Why their name can not be defined as same as ones in other translation unit?<br />
For example, below case :<br />
/*tunit1.c*/<br />
static int8_t count;  <br />
static void foo ( void )<br />
{<br />
}<br />
<br />
/*tunit2.c*/<br />
static int8_t count;  <br />
static void foo ( void )<br />
{<br />
}]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 5.1 and  case-sensitive]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1346</link>
			<pubDate>Mon, 12 Jun 2017 03:25:56 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4742">xiangke</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1346</guid>
			<description><![CDATA[Have  a short  description  in example  section  of  Rule 5.1:<br />
In the following non-compliant example, the implementation supports 6 significant case-insensitive characters in external identifiers. The identifiers in the two translation units are diï¬€erent but are not distinct in their significant characters.<br />
/* file1.c */ int32_t abc = 0;<br />
/* file2.c */ int32_t ABC = 0;<br />
<br />
Have  another  description  <br />
In the following example, the definitions all occur in the same translation unit. The implementation in question supports 31 significant case-sensitive characters in external identifiers.<br />
/*	1234567890123456789012345678901*********	Characters	*/<br />
int32_t engine_exhaust_gas_temperature_raw;<br />
int32_t engine_exhaust_gas_temperature_scaled;   /* Non-compliant */<br />
<br />
Case-sensitive  is mentioned  here,  I think  it means that  the following case  is compliant <br />
/* file1.c */ int32_t abc = 0;<br />
/* file2.c */ int32_t ABC = 0;<br />
<br />
is it inconsistent? case-sensitive  is  implemented or  supported  for this rule ?]]></description>
			<content:encoded><![CDATA[Have  a short  description  in example  section  of  Rule 5.1:<br />
In the following non-compliant example, the implementation supports 6 significant case-insensitive characters in external identifiers. The identifiers in the two translation units are diï¬€erent but are not distinct in their significant characters.<br />
/* file1.c */ int32_t abc = 0;<br />
/* file2.c */ int32_t ABC = 0;<br />
<br />
Have  another  description  <br />
In the following example, the definitions all occur in the same translation unit. The implementation in question supports 31 significant case-sensitive characters in external identifiers.<br />
/*	1234567890123456789012345678901*********	Characters	*/<br />
int32_t engine_exhaust_gas_temperature_raw;<br />
int32_t engine_exhaust_gas_temperature_scaled;   /* Non-compliant */<br />
<br />
Case-sensitive  is mentioned  here,  I think  it means that  the following case  is compliant <br />
/* file1.c */ int32_t abc = 0;<br />
/* file2.c */ int32_t ABC = 0;<br />
<br />
is it inconsistent? case-sensitive  is  implemented or  supported  for this rule ?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[5.5 and groups of preprocessing]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1211</link>
			<pubDate>Tue, 03 Nov 2015 06:44:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=1443">lovewar</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1211</guid>
			<description><![CDATA[such as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#ifndef NO_TAG<br />
static void log (const char *format, ...)<br />
{<br />
}<br />
#else<br />
#if defined(__STDC_VERSION__)<br />
#define log(...) do { } while (0)&nbsp;&nbsp;&nbsp;&nbsp;// here<br />
#endif<br />
#endif</code></div></div>and, the identifier(log) exists after preprocssing has been performed:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>static void log (const char *format, ...)&nbsp;&nbsp; // does it apply to #define log ?<br />
{<br />
}</code></div></div>I have a question regarding rule 5.5: does the function(log) apply to #define log ?]]></description>
			<content:encoded><![CDATA[such as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#ifndef NO_TAG<br />
static void log (const char *format, ...)<br />
{<br />
}<br />
#else<br />
#if defined(__STDC_VERSION__)<br />
#define log(...) do { } while (0)&nbsp;&nbsp;&nbsp;&nbsp;// here<br />
#endif<br />
#endif</code></div></div>and, the identifier(log) exists after preprocssing has been performed:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>static void log (const char *format, ...)&nbsp;&nbsp; // does it apply to #define log ?<br />
{<br />
}</code></div></div>I have a question regarding rule 5.5: does the function(log) apply to #define log ?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 5.9 - Scope of uniqueness]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1203</link>
			<pubDate>Fri, 11 Sep 2015 16:49:51 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4006">jade</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1203</guid>
			<description><![CDATA[In Rule 5.9, the amplification says that the identifier name should be unique across all name spaces and translation units.  This is an expansion of what's in the rule header, but is consistent with the purpose of the "Amplification" sections.  However, the examples imply that identifiers can be unique if there is no linkage.  Isn't this a contradiction?]]></description>
			<content:encoded><![CDATA[In Rule 5.9, the amplification says that the identifier name should be unique across all name spaces and translation units.  This is an expansion of what's in the rule header, but is consistent with the purpose of the "Amplification" sections.  However, the examples imply that identifiers can be unique if there is no linkage.  Isn't this a contradiction?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[5.8 and external identifiers in different header file]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1201</link>
			<pubDate>Tue, 25 Aug 2015 01:39:09 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=1443">lovewar</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1201</guid>
			<description><![CDATA[Would the following examples be non-compliant with rule #5.8?<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/* file 1. h */<br />
extern int32_t count;&nbsp;&nbsp;&nbsp;&nbsp;<br />
extern void foo(void);<br />
<br />
/* file 2.h */<br />
extern int32_t count;&nbsp;&nbsp; // here<br />
extern void zoo(void);</code></div></div>]]></description>
			<content:encoded><![CDATA[Would the following examples be non-compliant with rule #5.8?<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/* file 1. h */<br />
extern int32_t count;&nbsp;&nbsp;&nbsp;&nbsp;<br />
extern void foo(void);<br />
<br />
/* file 2.h */<br />
extern int32_t count;&nbsp;&nbsp; // here<br />
extern void zoo(void);</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 5.4: Macro identifier]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1187</link>
			<pubDate>Tue, 16 Jun 2015 12:01:33 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=3496">Polyspacer</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1187</guid>
			<description><![CDATA[I have a question regarding rule 5.4: Which of the following #defines is violating this rule?<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define&nbsp;&nbsp;engine_exhaust_gas_temperature_high_raw&nbsp;&nbsp;&nbsp;&nbsp; egt_r<br />
#define&nbsp;&nbsp;engine_exhaust_gas_temperature_high_scaled&nbsp;&nbsp;egt_s <br />
<br />
#define x 0<br />
#define x 0<br />
<br />
#ifndef ABCDE<br />
#define DAI_AGK_SEC_1BIT_RAM_START<br />
#endif<br />
<br />
#ifndef FGHIJ<br />
#define DAI_AGK_SEC_1BIT_RAM_START<br />
#endif<br />
<br />
unsigned long int A; <br />
unsigned short int Con = 0;<br />
<br />
void main(void) <br />
{<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;/*5.4*/<br />
&nbsp;&nbsp;&nbsp;&nbsp;#ifdef DAI_AGK_SEC_1BIT_RAM_START<br />
&nbsp;&nbsp;&nbsp;&nbsp;A = Con;<br />
&nbsp;&nbsp;&nbsp;&nbsp;#endif<br />
&nbsp;&nbsp;&nbsp;&nbsp;A = x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
}</code></div></div><br />
The 1st and 2nd #define are similar to the example given in the MISRA-C guideline. Hence, the 2nd #define violates the rule.<br />
The 3rd and 4th #define are identical. Therefore, the 4th #define violates the rule.<br />
The 5th and 6th #define are identical as well. Does the 6th #define violate the rule? According to the glossary, the macro name is a macro identifier...]]></description>
			<content:encoded><![CDATA[I have a question regarding rule 5.4: Which of the following #defines is violating this rule?<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define&nbsp;&nbsp;engine_exhaust_gas_temperature_high_raw&nbsp;&nbsp;&nbsp;&nbsp; egt_r<br />
#define&nbsp;&nbsp;engine_exhaust_gas_temperature_high_scaled&nbsp;&nbsp;egt_s <br />
<br />
#define x 0<br />
#define x 0<br />
<br />
#ifndef ABCDE<br />
#define DAI_AGK_SEC_1BIT_RAM_START<br />
#endif<br />
<br />
#ifndef FGHIJ<br />
#define DAI_AGK_SEC_1BIT_RAM_START<br />
#endif<br />
<br />
unsigned long int A; <br />
unsigned short int Con = 0;<br />
<br />
void main(void) <br />
{<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;/*5.4*/<br />
&nbsp;&nbsp;&nbsp;&nbsp;#ifdef DAI_AGK_SEC_1BIT_RAM_START<br />
&nbsp;&nbsp;&nbsp;&nbsp;A = Con;<br />
&nbsp;&nbsp;&nbsp;&nbsp;#endif<br />
&nbsp;&nbsp;&nbsp;&nbsp;A = x;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<br />
}</code></div></div><br />
The 1st and 2nd #define are similar to the example given in the MISRA-C guideline. Hence, the 2nd #define violates the rule.<br />
The 3rd and 4th #define are identical. Therefore, the 4th #define violates the rule.<br />
The 5th and 6th #define are identical as well. Does the 6th #define violate the rule? According to the glossary, the macro name is a macro identifier...]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[in the Example Suite, R_05_03.h]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1120</link>
			<pubDate>Thu, 16 Oct 2014 07:09:42 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=114">ogawa.kiyoshi</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1120</guid>
			<description><![CDATA[in the Example Suite, R_05_03.h <br />
<br />
#ifndef R_05_09_<br />
#define R_05_09_<br />
<br />
should be<br />
<br />
#ifndef R_05_03_<br />
#define R_05_03_<br />
<br />
BTW, now I compile the Example Suite using LLVM and add some supporting codes.<br />
The memo for compile the Example Suite is <br />
<a href="http://researchmap.jp/joydcij21-1861956/#_1861956" target="_blank" rel="noopener" class="mycode_url">http://researchmap.jp/joydcij21-1861956/#_1861956</a><br />
<br />
If there are any problems, please inform me.<br />
I have updated weekly.]]></description>
			<content:encoded><![CDATA[in the Example Suite, R_05_03.h <br />
<br />
#ifndef R_05_09_<br />
#define R_05_09_<br />
<br />
should be<br />
<br />
#ifndef R_05_03_<br />
#define R_05_03_<br />
<br />
BTW, now I compile the Example Suite using LLVM and add some supporting codes.<br />
The memo for compile the Example Suite is <br />
<a href="http://researchmap.jp/joydcij21-1861956/#_1861956" target="_blank" rel="noopener" class="mycode_url">http://researchmap.jp/joydcij21-1861956/#_1861956</a><br />
<br />
If there are any problems, please inform me.<br />
I have updated weekly.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 5.1: typographical error?]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1087</link>
			<pubDate>Wed, 30 Jul 2014 14:15:32 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=3355">swestin</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1087</guid>
			<description><![CDATA[The amplification for this rule states:<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>In C99 the  minimum requirement is that the first 31 characters of  external identifiers are significant, with each universal character or corresponding extended source character occupying between 6 and 10 characters.</blockquote>
<br />
I think this is an error, and the statement should end as the parallel statement for Rule 5.2:<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>In C99 the  minimum requirement is that the  first 31 characters of  external identifiers are significant, with each universal character or corresponding extended source character <span style="font-style: italic;" class="mycode_i"><span style="color: #800000;" class="mycode_color">counting as a single character.</span></span></blockquote>
<br />
Is this correct?<br />
<br />
-Stephen H. Westin<br />
 GrammaTech, Inc.]]></description>
			<content:encoded><![CDATA[The amplification for this rule states:<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>In C99 the  minimum requirement is that the first 31 characters of  external identifiers are significant, with each universal character or corresponding extended source character occupying between 6 and 10 characters.</blockquote>
<br />
I think this is an error, and the statement should end as the parallel statement for Rule 5.2:<br />
<br />
<blockquote class="mycode_quote"><cite>Quote:</cite>In C99 the  minimum requirement is that the  first 31 characters of  external identifiers are significant, with each universal character or corresponding extended source character <span style="font-style: italic;" class="mycode_i"><span style="color: #800000;" class="mycode_color">counting as a single character.</span></span></blockquote>
<br />
Is this correct?<br />
<br />
-Stephen H. Westin<br />
 GrammaTech, Inc.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[the definition of distinct]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=996</link>
			<pubDate>Mon, 18 Nov 2013 06:18:50 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=2730">Takafumi Wakita</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=996</guid>
			<description><![CDATA[Hello,<br />
<br />
in the Rule 5.1, 5.2, 5.3, 5.4 and 5.5.<br />
<br />
When portability is not our concern:<br />
<br />
Can we use the implementation defined limits for the definition of distinct?<br />
<br />
Best regards,<br />
Takafumi Wakita]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
in the Rule 5.1, 5.2, 5.3, 5.4 and 5.5.<br />
<br />
When portability is not our concern:<br />
<br />
Can we use the implementation defined limits for the definition of distinct?<br />
<br />
Best regards,<br />
Takafumi Wakita]]></content:encoded>
		</item>
	</channel>
</rss>