<?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 - 6.20 Standard Libraries]]></title>
		<link>https://forum.misra.org.uk/</link>
		<description><![CDATA[MISRA Discussion Forums - https://forum.misra.org.uk]]></description>
		<pubDate>Thu, 05 Nov 2026 15:13:45 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Executing process]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1517</link>
			<pubDate>Sun, 17 Nov 2019 22:40:04 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=5073">phdenis</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1517</guid>
			<description><![CDATA[Hello,<br />
<br />
Regarding the rule 20.11, the call of 'system' shall not be used. But In my current program, I'm creating process by using fork() and system() to start it.<br />
<br />
What is the best solution to create process and start it in order to comply with MISRA C 2004 ?<br />
<br />
By advance thanks for your answer.]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
Regarding the rule 20.11, the call of 'system' shall not be used. But In my current program, I'm creating process by using fork() and system() to start it.<br />
<br />
What is the best solution to create process and start it in order to comply with MISRA C 2004 ?<br />
<br />
By advance thanks for your answer.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[MISRA 20.2]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1419</link>
			<pubDate>Thu, 26 Apr 2018 14:18:46 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4977">ankitshah413</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1419</guid>
			<description><![CDATA[Hello,<br />
<br />
Why the following code is the violation of MISRA 20.2 ?<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define abs(a)&nbsp;&nbsp; (((a) &lt; (0)) ? -(a) : (a))</code></div></div><br />
As far as I understand from the topics , 20.2 does not concern with preprocessor identifier then why I get an violation for the same.]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
Why the following code is the violation of MISRA 20.2 ?<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define abs(a)&nbsp;&nbsp; (((a) &lt; (0)) ? -(a) : (a))</code></div></div><br />
As far as I understand from the topics , 20.2 does not concern with preprocessor identifier then why I get an violation for the same.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Misra rule 20.3]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1320</link>
			<pubDate>Wed, 01 Mar 2017 11:31:01 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=4662">dvnarendra</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1320</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define MAX_BUF_LEN 20<br />
#define MAX_ID_LEN&nbsp;&nbsp;&nbsp;&nbsp;40<br />
<br />
typedef struct<br />
{<br />
uint8_t&nbsp;&nbsp;sno[MAX_BUF_LEN];<br />
uint8_t&nbsp;&nbsp;ID[MAX_ID_LEN ];'<br />
} xdata_t;<br />
<br />
typedef {<br />
uint8_t&nbsp;&nbsp; time;<br />
uint32_t vol;<br />
uint8_t ID[MAX_ID_LEN ];<br />
}xpf_t<br />
<br />
xdata_t&nbsp;&nbsp;testdata;<br />
xpf_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pfdata<br />
....<br />
memcpy(pfdata.ID, testdata.ID, MAX_ID_LEN );&nbsp;&nbsp;// Misra not compliant<br />
......</code></div></div><br />
I am using parasoft tool for checking misra compliance. for the above memcpy line I am getting the following misra non compliance<br />
<br />
<span style="font-weight: bold;" class="mycode_b"> Values  is "ID"  passed to library function "memcpy" without being checked </span><br />
<br />
I am using statically declared array.  Why is it throwing this misra compliance?  Can any one point how to make thsi line compliant<br />
<br />
TIA<br />
Narendra]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define MAX_BUF_LEN 20<br />
#define MAX_ID_LEN&nbsp;&nbsp;&nbsp;&nbsp;40<br />
<br />
typedef struct<br />
{<br />
uint8_t&nbsp;&nbsp;sno[MAX_BUF_LEN];<br />
uint8_t&nbsp;&nbsp;ID[MAX_ID_LEN ];'<br />
} xdata_t;<br />
<br />
typedef {<br />
uint8_t&nbsp;&nbsp; time;<br />
uint32_t vol;<br />
uint8_t ID[MAX_ID_LEN ];<br />
}xpf_t<br />
<br />
xdata_t&nbsp;&nbsp;testdata;<br />
xpf_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pfdata<br />
....<br />
memcpy(pfdata.ID, testdata.ID, MAX_ID_LEN );&nbsp;&nbsp;// Misra not compliant<br />
......</code></div></div><br />
I am using parasoft tool for checking misra compliance. for the above memcpy line I am getting the following misra non compliance<br />
<br />
<span style="font-weight: bold;" class="mycode_b"> Values  is "ID"  passed to library function "memcpy" without being checked </span><br />
<br />
I am using statically declared array.  Why is it throwing this misra compliance?  Can any one point how to make thsi line compliant<br />
<br />
TIA<br />
Narendra]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[MISRA rule 20.1 and 20.2]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=1040</link>
			<pubDate>Fri, 14 Mar 2014 18:53:59 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=3222">VRK</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=1040</guid>
			<description><![CDATA[20.1 (req): %s: Reserved identifiers, macros and functions in the standard library, shall not be defined, redefined or undefined.<br />
20.2 (req): %s: The names of standard library macros, objects and functions shall not be reused.<br />
<br />
As per the rule 20.1,  Reserved identifiers should not be defined, redefined or undefined.<br />
I am getting the violation of MISRA 20.2 for the below example:<br />
<br />
For the declaration, <br />
                   int for;<br />
'for' is the reserve identifier. It is re-defined as variable declaration and it is not used in any standard library.<br />
Hence it should violates the MISRA rule 20.1 and not MISRA rule 20.2.<br />
<br />
Please explain the difference between MISRA 20.1 and 20.2 rules with suitable examples.]]></description>
			<content:encoded><![CDATA[20.1 (req): %s: Reserved identifiers, macros and functions in the standard library, shall not be defined, redefined or undefined.<br />
20.2 (req): %s: The names of standard library macros, objects and functions shall not be reused.<br />
<br />
As per the rule 20.1,  Reserved identifiers should not be defined, redefined or undefined.<br />
I am getting the violation of MISRA 20.2 for the below example:<br />
<br />
For the declaration, <br />
                   int for;<br />
'for' is the reserve identifier. It is re-defined as variable declaration and it is not used in any standard library.<br />
Hence it should violates the MISRA rule 20.1 and not MISRA rule 20.2.<br />
<br />
Please explain the difference between MISRA 20.1 and 20.2 rules with suitable examples.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Dynamic memory allocation - rule 20.4]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=928</link>
			<pubDate>Thu, 13 Dec 2012 11:49:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=2375">mroczeks</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=928</guid>
			<description><![CDATA[Hi, <br />
<br />
I missed discussion about new Misra C to be released. <br />
Anyway now and then I have several questions and comments about dynamic memory allocation. <br />
<br />
In Misra C 2004 there is only one rule (20.4) addressing dynamic memory allocation. <br />
In my opinion it's too little. There are questions not answered by this single rule. <br />
<br />
So the questions are: <br />
1. Is this rule only forbiding use of malloc, calloc, realloc and free functions while leaving a room for implementation and use of prorpietary functions? <br />
<br />
2. Is proprietary dynamic memory management allowed in any way? <br />
<br />
3. I would like to implement my own "heap" (pool) which would allow for memory allocation on startup only and no deallocation anytime. Is this possible without violation of this rule? <br />
<br />
In my opinion these questions should be answered in new Misra in some clearer way. <br />
<br />
Best regards, <br />
Szymon]]></description>
			<content:encoded><![CDATA[Hi, <br />
<br />
I missed discussion about new Misra C to be released. <br />
Anyway now and then I have several questions and comments about dynamic memory allocation. <br />
<br />
In Misra C 2004 there is only one rule (20.4) addressing dynamic memory allocation. <br />
In my opinion it's too little. There are questions not answered by this single rule. <br />
<br />
So the questions are: <br />
1. Is this rule only forbiding use of malloc, calloc, realloc and free functions while leaving a room for implementation and use of prorpietary functions? <br />
<br />
2. Is proprietary dynamic memory management allowed in any way? <br />
<br />
3. I would like to implement my own "heap" (pool) which would allow for memory allocation on startup only and no deallocation anytime. Is this possible without violation of this rule? <br />
<br />
In my opinion these questions should be answered in new Misra in some clearer way. <br />
<br />
Best regards, <br />
Szymon]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[about rule20_5]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=744</link>
			<pubDate>Tue, 15 Jun 2010 06:38:50 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=1053">Manisha Nikambe</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=744</guid>
			<description><![CDATA[void func()<br />
{<br />
  int errno;//does even declaration of errno violates rule20_5,errno is user defined?<br />
}]]></description>
			<content:encoded><![CDATA[void func()<br />
{<br />
  int errno;//does even declaration of errno violates rule20_5,errno is user defined?<br />
}]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[about rule20.5]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=740</link>
			<pubDate>Tue, 25 May 2010 12:18:47 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=1034">raghaw_k</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=740</guid>
			<description><![CDATA[According to the rule 20.5, error indiaction facility should not be used even if it is well defined.<br />
1)Is it mean that we should not declare the identifier(function and variable) with the name "errno"?<br />
2)As per the standard library for linux "errno" MACRO is defined to function pointer call and for Visual C++ it is extern variable declaration. So does usage of "errno"(i.e. function call) on linux also violates the  rule 20.5?]]></description>
			<content:encoded><![CDATA[According to the rule 20.5, error indiaction facility should not be used even if it is well defined.<br />
1)Is it mean that we should not declare the identifier(function and variable) with the name "errno"?<br />
2)As per the standard library for linux "errno" MACRO is defined to function pointer call and for Visual C++ it is extern variable declaration. So does usage of "errno"(i.e. function call) on linux also violates the  rule 20.5?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Do not use the sizeof() operator]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=672</link>
			<pubDate>Mon, 03 Aug 2009 13:13:12 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=868">hanthen</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=672</guid>
			<description><![CDATA[I would suggest a new rule for MISRA C. <br />
"Do not use the sizeof() operator". <br />
Output seems to be compiler dependent, e.g. TI compiler for TMS320C2x/C2xx/C5x series returns the number of 16bit units.<br />
<br />
They (TI) claim, that there is an ambiguity in the ANSI C definition:<br />
- sizeof() shall return the number of bytes<br />
- sizeof(char) shall return 1<br />
As they implement a char as 16 bit, their solution of the dilemma is to define a byte as 16 bit.<br />
<br />
This sounds problematic and will cause issues while porting code, which uses the sizeof() operator.]]></description>
			<content:encoded><![CDATA[I would suggest a new rule for MISRA C. <br />
"Do not use the sizeof() operator". <br />
Output seems to be compiler dependent, e.g. TI compiler for TMS320C2x/C2xx/C5x series returns the number of 16bit units.<br />
<br />
They (TI) claim, that there is an ambiguity in the ANSI C definition:<br />
- sizeof() shall return the number of bytes<br />
- sizeof(char) shall return 1<br />
As they implement a char as 16 bit, their solution of the dilemma is to define a byte as 16 bit.<br />
<br />
This sounds problematic and will cause issues while porting code, which uses the sizeof() operator.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Clarification Needed on Rule 20.12]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=632</link>
			<pubDate>Thu, 05 Mar 2009 15:24:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=201">vijayendra</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=632</guid>
			<description><![CDATA[Rule says not to use any functionality of  and it is a Required rule.<br />
<br />
How to use POSIX compliant timer APIs like timer_create, timer_settime etc is also defined in this header file?]]></description>
			<content:encoded><![CDATA[Rule says not to use any functionality of  and it is a Required rule.<br />
<br />
How to use POSIX compliant timer APIs like timer_create, timer_settime etc is also defined in this header file?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[20.1, 20.2 scopes]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=517</link>
			<pubDate>Thu, 15 May 2008 13:08:18 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=368">pkruk</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=517</guid>
			<description><![CDATA[Is rule 20.1 limited to #define and #undef directives? <br />
Is rule 20.2 limited only to identifiers already defined in standard library?<br />
<br />
If this is true:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void errno(); <br />
/* errono is a reserved keyword and is already defined in standard library */<br />
/* This code is a violation of rule 20.2 only&nbsp;&nbsp;*/<br />
<br />
int __MyVariable(); <br />
/* __MyVariable is also a reserved keyword but is not defined in standard library */<br />
/* This code is not a violation of 20.1 nor 20.2 */</code></div></div>]]></description>
			<content:encoded><![CDATA[Is rule 20.1 limited to #define and #undef directives? <br />
Is rule 20.2 limited only to identifiers already defined in standard library?<br />
<br />
If this is true:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>void errno(); <br />
/* errono is a reserved keyword and is already defined in standard library */<br />
/* This code is a violation of rule 20.2 only&nbsp;&nbsp;*/<br />
<br />
int __MyVariable(); <br />
/* __MyVariable is also a reserved keyword but is not defined in standard library */<br />
/* This code is not a violation of 20.1 nor 20.2 */</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rule 20.9]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=220</link>
			<pubDate>Tue, 21 Feb 2006 10:56:15 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=212">Nuria</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=220</guid>
			<description><![CDATA[Rule 20.9 says that the input/output library  shall not be used in production code. <br />
<br />
We can not use the function open because is not ANSI C. Which would be the alternative to open a file instead of fopen?<br />
<br />
Thanks.]]></description>
			<content:encoded><![CDATA[Rule 20.9 says that the input/output library  shall not be used in production code. <br />
<br />
We can not use the function open because is not ANSI C. Which would be the alternative to open a file instead of fopen?<br />
<br />
Thanks.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Is Rule 20.1 applicable to \"defined\"?]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=40</link>
			<pubDate>Fri, 09 Sep 2005 13:30:17 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=0">Gavin McCall</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=40</guid>
			<description><![CDATA[Question: Is Rule 20.1 applicable to \"defined\"?<br />
<br />
(a) We presume that \"#define defined (10)\" will be in violation of Rule 20.1.<br />
<br />
(b) If our presumption is correct, then which of \"reserved identifier\", \" macro\" or \"function\" will \"defined\" be?  <br />
We could not find the answer in ISO/IEC 9899:1990. Is it described somewhere in COR1, COR2 or AMD1?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Answer: MISRA C Steering Team 7/9/2005<br />
<br />
(a) YES - defined is included in the text under the rule. <br />
  <br />
(b) defined is listed under 6.8.8 Predefined Macro Names. <br />
It is also listed in Appendix G: Undefined Behaviour 54.</span>]]></description>
			<content:encoded><![CDATA[Question: Is Rule 20.1 applicable to \"defined\"?<br />
<br />
(a) We presume that \"#define defined (10)\" will be in violation of Rule 20.1.<br />
<br />
(b) If our presumption is correct, then which of \"reserved identifier\", \" macro\" or \"function\" will \"defined\" be?  <br />
We could not find the answer in ISO/IEC 9899:1990. Is it described somewhere in COR1, COR2 or AMD1?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Answer: MISRA C Steering Team 7/9/2005<br />
<br />
(a) YES - defined is included in the text under the rule. <br />
  <br />
(b) defined is listed under 6.8.8 Predefined Macro Names. <br />
It is also listed in Appendix G: Undefined Behaviour 54.</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[What about keywords?]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=39</link>
			<pubDate>Fri, 09 Sep 2005 13:04:17 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=0">Gavin McCall</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=39</guid>
			<description><![CDATA[Question:<br />
<br />
Is it correct to think that a keyword is out of the scope of Rule 20.1?<br />
<br />
For example, \"#define int (10)\" violates Rule 19.4, doesn't it?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Answer: MISRA C Steering Team 7/9/2005<br />
<br />
<span style="text-decoration: underline;" class="mycode_u">Keywords (as defined in 6.1.1) shall be considered to be in the scope of 20.1.</span> <br />
This is detailed in the supporting text and will be clarified in the Technical Corrigendum. <br />
<br />
#define int (10) <br />
<br />
This is not a violation of 19.4. <br />
<br />
19.4 is concerned with the replacement text of a macro, and not its name.</span>]]></description>
			<content:encoded><![CDATA[Question:<br />
<br />
Is it correct to think that a keyword is out of the scope of Rule 20.1?<br />
<br />
For example, \"#define int (10)\" violates Rule 19.4, doesn't it?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Answer: MISRA C Steering Team 7/9/2005<br />
<br />
<span style="text-decoration: underline;" class="mycode_u">Keywords (as defined in 6.1.1) shall be considered to be in the scope of 20.1.</span> <br />
This is detailed in the supporting text and will be clarified in the Technical Corrigendum. <br />
<br />
#define int (10) <br />
<br />
This is not a violation of 19.4. <br />
<br />
19.4 is concerned with the replacement text of a macro, and not its name.</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Clarification of 20.1 - Intrepretation of \"not to be d]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=38</link>
			<pubDate>Fri, 09 Sep 2005 13:00:50 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=0">Gavin McCall</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=38</guid>
			<description><![CDATA[Question 2: Interpretation of \"not be defined, redefined\"<br />
<br />
a) Does it mean that \"#define\" is not allowed? <br />
<br />
b) Is it not allowed to define as an object or a function, either?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Answer: MISRA C Steering Team clarification 7/9/2005<br />
<br />
(a) YES - To define an object or a function with the name of a reserved identifier is prohibited under rule 20.2.<br />
<br />
(b) YES - To #define macros with the name of a reserved identifier is prohibited.</span>]]></description>
			<content:encoded><![CDATA[Question 2: Interpretation of \"not be defined, redefined\"<br />
<br />
a) Does it mean that \"#define\" is not allowed? <br />
<br />
b) Is it not allowed to define as an object or a function, either?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Answer: MISRA C Steering Team clarification 7/9/2005<br />
<br />
(a) YES - To define an object or a function with the name of a reserved identifier is prohibited under rule 20.2.<br />
<br />
(b) YES - To #define macros with the name of a reserved identifier is prohibited.</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Clarification of 20.1 Scope]]></title>
			<link>https://forum.misra.org.uk/showthread.php?tid=37</link>
			<pubDate>Fri, 09 Sep 2005 12:57:03 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.misra.org.uk/member.php?action=profile&uid=0">Gavin McCall</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.misra.org.uk/showthread.php?tid=37</guid>
			<description><![CDATA[Question: <br />
<br />
Question 1: Interpretation of \"Reserved identifiers, macros and functions in the standard library\"<br />
<br />
Does this phrase mean<br />
a) \"Reserved identifiers<br />
   AND<br />
   macros in the standard library<br />
   AND<br />
   functions in the standard library\"<br />
or<br />
b) \"Reserved identifiers in the standard library<br />
   AND<br />
   macros in the standard library<br />
   AND<br />
   functions in the standard library\" ?<br />
<br />
  It seems that in case of a) above, \"#define __ABC (10)\" violates Rule 20.1 whereas it does not in case of b), because  \"__ABC\", which is a reserved identifier, is not in the standard library. Moreover, it is not guaranteed that all of \"__LINE__, __FILE__, __DATE__, __TIME__, __STDC__ \" <br />
are in the standard library. If not in the standard library, it is presumed that they can be \"defined, redefined or undefined\". Which interpretation should we take, a) or b) ?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">MISRA C Steering Team Answer (7/9/2005)<br />
Option A.<br />
Reserved identifiers are defined by ISO/IEC 9899:1990 sections 7.1.3 Reserved Identifiers, 7.13 Future library directions and 6.8.8 Predefined Macro Names. <br />
Macros in the standard library are examples of reserved identifiers. <br />
Functions in the standard library are examples of reserved identifiers. <br />
<br />
Any identifier in the standard library is an example of reserved identifiers</span>.]]></description>
			<content:encoded><![CDATA[Question: <br />
<br />
Question 1: Interpretation of \"Reserved identifiers, macros and functions in the standard library\"<br />
<br />
Does this phrase mean<br />
a) \"Reserved identifiers<br />
   AND<br />
   macros in the standard library<br />
   AND<br />
   functions in the standard library\"<br />
or<br />
b) \"Reserved identifiers in the standard library<br />
   AND<br />
   macros in the standard library<br />
   AND<br />
   functions in the standard library\" ?<br />
<br />
  It seems that in case of a) above, \"#define __ABC (10)\" violates Rule 20.1 whereas it does not in case of b), because  \"__ABC\", which is a reserved identifier, is not in the standard library. Moreover, it is not guaranteed that all of \"__LINE__, __FILE__, __DATE__, __TIME__, __STDC__ \" <br />
are in the standard library. If not in the standard library, it is presumed that they can be \"defined, redefined or undefined\". Which interpretation should we take, a) or b) ?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">MISRA C Steering Team Answer (7/9/2005)<br />
Option A.<br />
Reserved identifiers are defined by ISO/IEC 9899:1990 sections 7.1.3 Reserved Identifiers, 7.13 Future library directions and 6.8.8 Predefined Macro Names. <br />
Macros in the standard library are examples of reserved identifiers. <br />
Functions in the standard library are examples of reserved identifiers. <br />
<br />
Any identifier in the standard library is an example of reserved identifiers</span>.]]></content:encoded>
		</item>
	</channel>
</rss>