Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





  Clarification of 20.1 - Intrepretation of \"not to be d
Posted by: Gavin McCall - 09-09-2005, 01:00 PM - Forum: 6.20 Standard Libraries - No Replies

Question 2: Interpretation of \"not be defined, redefined\"

a) Does it mean that \"#define\" is not allowed?

b) Is it not allowed to define as an object or a function, either?

Answer: MISRA C Steering Team clarification 7/9/2005

(a) YES - To define an object or a function with the name of a reserved identifier is prohibited under rule 20.2.

(b) YES - To #define macros with the name of a reserved identifier is prohibited.

Print this item

  Clarification of 20.1 Scope
Posted by: Gavin McCall - 09-09-2005, 12:57 PM - Forum: 6.20 Standard Libraries - No Replies

Question:

Question 1: Interpretation of \"Reserved identifiers, macros and functions in the standard library\"

Does this phrase mean
a) \"Reserved identifiers
AND
macros in the standard library
AND
functions in the standard library\"
or
b) \"Reserved identifiers in the standard library
AND
macros in the standard library
AND
functions in the standard library\" ?

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__ \"
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) ?

MISRA C Steering Team Answer (7/9/2005)
Option A.
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.
Macros in the standard library are examples of reserved identifiers.
Functions in the standard library are examples of reserved identifiers.

Any identifier in the standard library is an example of reserved identifiers
.

Print this item

  phpbb update
Posted by: forum admin - 09-08-2005, 09:43 AM - Forum: Announcements - No Replies

I've updated the phpbb code today to fix some security concerns.

If you spot something not working, please let me know.

--------------
IT Manager

Print this item

  MISRA C++
Posted by: david ward - 22-07-2005, 01:50 PM - Forum: Announcements - No Replies

In the beginning \"C\" was considered unsuitable for safety critical and safety related systems, however, it was so used ...

In 1998, as a response to this situation, MISRA produced MISRA C, a set of guidelines to aid the development of safety related systems in \"C\" in the automotive world. Since then, MISRA C has been adopted by the wider embedded systems community and has become the dominant, international coding guidelines for the use of \"C\" in critical systems. The MISRA C guidelines are widely accepted as fulfilling the requirements for a language subset as required by both the 1994 MISRA \"Development guidelines for vehicle based software\" and IEC 61508.

Things move on, and now C++ is in the position once held by \"C\"; many people believe that it should not be used for critical systems, but its use within the field is growing and that growth is without a common set of guidelines.

MISRA has recently started work on the production of a set of guidelines for the use of C++ in critical systems, the output of which will be a set of guidelines similar to those that were produced for \"C\".

The work, like other MISRA work, will be done on a voluntary basis. As such, MISRA is currently looking for 3 to 5 additional people to participate in the development of MISRA C++. We are looking for dedicated people who can contribute to a two day, focused working meeting once a month and who are also willing to put in effort \"off-line\".

If you are interested in taking part, please send your details to the chairman of the working group, Chris Tapp (chairman (at) misra-cpp.org). A brief note on your background would be appreciated, especially as we expect to receive too many volunteers and will have to make some tough choices!

Print this item

  Forum Digests
Posted by: forum admin - 27-06-2005, 02:13 PM - Forum: Announcements - No Replies

It has been reported that the mail digest system has not been working for some time. My apologies to all who have been affected by this outage.

When we moved the MISRA-C2 website to a new server, the batch job to mail out the digest each hour was omitted. It has now been reinstated, and appears to be mailing out digests OK.

You can subscribe/unsubscribe to digests of the forum using the link at the top of the page. Set the options to receive the digests of what you want, when you want it and click on the \"update\" button. It should then mail out as you request. Note that the hour is GMT, so you'll need to take that into account when electing the time to receive the digests.

Thanks

Print this item

  Bulletin board access
Posted by: david ward - 24-06-2005, 08:02 AM - Forum: Announcements - No Replies

In order to make this bulletin board more user-friendly and accessible, it is no longer necessary to log in to view posts. It is still necessary to be a registered user and to log in to make posts.

If you have any comments or concerns please contact the forum admin.

Print this item

  Explicit size of array in declaration with external linkage?
Posted by: stroelea - 23-06-2005, 02:45 PM - Forum: 6.8 Declarations and Definitions - Replies (1)

Whenever you change the definition of an array, the corresponding declaration for external linkage may need to be adapted (different size of array). This is error-prone since the declaration usually is included in a file different from the file with the definition. As a consequence, the code becomes inconsistent and more difficult to understand.
Moreover, the size information in the declaration with external linkage is redundant. Compilers usually ignore it.
So what are the benefits of having rule 8.12 classified as a \"required\" rule?

Print this item

  MISRA C:1998 Rule 113
Posted by: aekalman - 15-06-2005, 04:08 PM - Forum: General Questions - Replies (2)

Hello All.

I am running the comercial RTOS Salvo through the MISRA checker as implemented in IAR's EWARM v4.20A tool suite.

I have a struct called ecb which in turn contains a field called tcbP. ecbP is a pointer to the struct ecb. OSeligQP is a pointer to a struct tcb.

The IAR MISRA checker complains about a call to a function

Code:
OSInsPrioQ(OScTcbP, &(ecbP->tcbP));

whereas it's fine with

Code:
OSInsPrioQ(OScTcbP, &OSeligQP);

Now, I admit that I do not know MISRA views passing a parameter by reference, but it certainly doesn't disallow it. In my example, a member of a struct is being passed by reference (not by value), and is being accessed by name, as per MISRA.

So, is this legal in MISRA-C?

Thanks for any and all input.

--Andrew

Print this item

  List of Companies using MISRA C Guidelines in coding
Posted by: Babita Sharma - 14-06-2005, 07:47 AM - Forum: General Questions - Replies (1)

I belong to the Formal Verification group of Bhabha Atomic Research Centre. I wish to promote the use of MISRA C guidelines in my company. A list of companies in various sectors such as aerospace and military, that have accepted MISRA C standards, will help me a lot. May I ask the members of this group to help me.

Babita.

Print this item

  Code Formatter / Beautifyer for 14.8 and 14.9 ?
Posted by: bmerkle - 04-05-2005, 11:45 AM - Forum: 6.14 Control Flow - Replies (3)

Hi there,

is there any Code Formatter / Beautifyer that reformats C code according to the MISRA rules, e.g. MISRA2 Rule 14.9 or Rule 14.8 or MISRA1 Rule59 ?

I know of artistic style (on sf) but unfortunately it has not the rule

kind regards,
Bernhard.

Print this item

Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,213
» Latest member: kkleiner
» Forum threads: 1,019
» Forum posts: 2,807

Full Statistics

Online Users
There are currently 171 online users.
» 0 Member(s) | 167 Guest(s)
Applebot, Bing, Google, UptimeRobot

Latest Threads
9.4.2 - Requirement about...
Forum: 4.9 Statements
Last Post: cgpzs
20-05-2025, 10:03 AM
» Replies: 0
» Views: 50
21.2.2 Why shall std::str...
Forum: 4.21 Language support library
Last Post: cgpzs
20-05-2025, 09:45 AM
» Replies: 2
» Views: 135
Rule 7.0.5, example non-c...
Forum: 4.7 Standard conversions
Last Post: cgpzs
20-05-2025, 09:30 AM
» Replies: 2
» Views: 282
About MISRA-C 2023 Permit
Forum: General Questions
Last Post: cgpzs
19-05-2025, 01:06 PM
» Replies: 2
» Views: 924
MISRA 2023 Test Suite
Forum: General Questions
Last Post: misra-c
08-05-2025, 08:35 AM
» Replies: 1
» Views: 864
Roadmap to c23 support
Forum: General Questions
Last Post: misra-c
08-05-2025, 08:34 AM
» Replies: 1
» Views: 314
Typo in Appendix C of MIS...
Forum: 8.10 The essential type model
Last Post: misra-c
08-05-2025, 08:21 AM
» Replies: 1
» Views: 260
A3-3-2 Contradictory exam...
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
31-03-2025, 09:30 AM
» Replies: 2
» Views: 408
16.6.1 clarification
Forum: 4.16 Overloading
Last Post: cgpzs
31-03-2025, 09:29 AM
» Replies: 2
» Views: 390
Rule 9.3.1 - iteration st...
Forum: 4.9 Statements
Last Post: misra cpp
28-03-2025, 01:17 PM
» Replies: 1
» Views: 284