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

Username
  

Password
  





  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

  Nominal or Physical?
Posted by: gs - 23-03-2005, 12:05 AM - Forum: 6.10 Arithmetic Type Conversions - Replies (5)

10.1a prohibits implicit conversions of an integer expression if it is not to a type wider than the underlying type (and of the same signedness). Suppose ints are the same size as shorts on my system, can I implicitly convert an short to an int? Technically, the ints are not wider than shorts, but nominally, they are. Any thoughts?

Print this item

Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,196
» Latest member: galibl1
» Forum threads: 1,008
» Forum posts: 2,779

Full Statistics

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

Latest Threads
A8-4-5: Should have an ex...
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
Yesterday, 02:14 PM
» Replies: 2
» Views: 119
A18-9-4
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
14-02-2025, 01:04 PM
» Replies: 3
» Views: 1,204
Rule 3-4-1 and lifetimes,...
Forum: 6.3 Basic concepts (C++)
Last Post: misra cpp
14-02-2025, 01:02 PM
» Replies: 1
» Views: 87
Application of Rule 15.0....
Forum: 4.15 Special member functions
Last Post: misra cpp
07-02-2025, 12:44 PM
» Replies: 3
» Views: 2,576
Rule 6.2.1: non-inline co...
Forum: 4.6 Basic concepts
Last Post: misra cpp
07-02-2025, 12:43 PM
» Replies: 3
» Views: 739
A7-2-1 Still relevant in ...
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
31-01-2025, 01:20 PM
» Replies: 1
» Views: 206
MISRA AC INT:2025
Forum: MISRA AC resources
Last Post: misra-ac
22-01-2025, 03:37 PM
» Replies: 0
» Views: 147
MISRA AC SLSF:2023 AMD3
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
13-01-2025, 10:58 AM
» Replies: 0
» Views: 199
MISRA AC SLSF:2023 AMD3
Forum: MISRA AC resources
Last Post: misra-ac
13-01-2025, 10:57 AM
» Replies: 0
» Views: 193
Rule 7.0.4 - exception fo...
Forum: 4.7 Standard conversions
Last Post: misra cpp
10-01-2025, 02:26 PM
» Replies: 4
» Views: 837