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

Username
  

Password
  





  12.6 for Preprocessor Directives?
Posted by: gs - 05-08-2010, 01:46 PM - Forum: 6.12 Expressions - Replies (3)

Was 12.6 intended to prohibit the use of the '!' operator on such code as

Code:
#if ! defined A
#endif
?

Could a case not be made the result of 'defined' is an "effectively Boolean Expression"?

Print this item

  6.2 With Respect to Arrays and Pointers?
Posted by: gs - 29-07-2010, 03:23 PM - Forum: 6.6 Types - Replies (1)

Is the following code permitted or prohibited by rule 6.2?

Code:
signed char a[10] = {"123456789"};
signed char *b = "123456789";

Print this item

  Rule 5-3-1 and bool & ...
Posted by: gs - 28-07-2010, 06:03 PM - Forum: 6.5 Expressions (C++) - Replies (2)

Are references to bools permitted under requirement #5-3-1?

Print this item

  Pointer to function conversions (11.1)
Posted by: pkruk - 28-07-2010, 10:46 AM - Forum: 6.11 Pointer Type Conversions - Replies (3)

Hello,

rule 11.1 disallows conversions between function pointers and any other type than integral type.

1. conversion between compatible function types - are they allowed? For example:

Code:
typedef struct S1 { int x; } TS1;
struct S1 (*f1)();
TS1 (*f2)();
f1 = f2; // Is this compliant?


2. what about following case?
Code:
enum STYPE_LIST {
        TYPEA,
    };

    typedef int (*func_t)(char *);
    typedef STYPE_LIST (*func_t2)(char *);

    void moo() {
        func_t p;
        func_t2 p2;
        p= (func_t)p2;  // Is this compliant? Enum vs int
    }

Print this item

  Notion of unused parameter in 0-1-11 and 0-1-12
Posted by: roberto - 25-07-2010, 02:58 PM - Forum: 6.0 Language independent issues (C++) - Replies (1)

Suppose `a' is a parameter. Does `sizeof(a)' count as a use of `a' for the purpose of compliance to 0-1-11 and 0-1-12?

Print this item

  Example for rule 10.1
Posted by: raghaw_k - 21-07-2010, 07:37 AM - Forum: MISRA-C:2004 Exemplar Suite - Replies (1)

as per the misra-c writtent in one of its reply that -
Rules 10.1 and 10.3 were designed with signed and unsigned expressions in mind. The treatment of enums, bitfields, chars, relational operators ( < , , >= ), logical operators ( &&, || ) and equality operators ( ==, != ) do not fit this model as yet.

But in Exempler test file mc2_1001.c line number 221
if ( u16r == 1 ) /* Not Compliant */

So if == operator do not fit in the 10.1 model then Why this line is Not Cpmpliant?

Print this item

  Joint MISRA/SCSC event 24-25 November 2010
Posted by: david ward - 16-07-2010, 01:49 PM - Forum: Announcements - No Replies

We are very pleased to announce that a tutorial and seminar in collaboration with the Safety-Critical Systems Club (SCSC) will be held on 24 and 25 November 2010 in London, UK. On the first day there will be two half-day tutorials, on the MISRA C and MISRA C++ guidelines for the use of these languages in critical systems. The second day will be a seminar that will consider how the MISRA guidelines support safety-related systems development in various industry sectors, and we are particularly keen to feature presentations of case studies. If you would like to speak at this seminar, please discuss your idea with me in the first instance.

Further details of the programme will be available in due course.

There will also be a small exhibition on the second day. Details of the exhibition are available from Joan Atkinson at the SCSC

Print this item

  Joint MISRA/SCSC event 24-25 November 2010
Posted by: david ward - 14-07-2010, 02:09 PM - Forum: C++ Announcements - No Replies

We are very pleased to announce that a tutorial and seminar in collaboration with the Safety-Critical Systems Club (SCSC) will be held on 24 and 25 November 2010 in London, UK. On the first day there will be two half-day tutorials, on the MISRA C and MISRA C++ guidelines for the use of these languages in critical systems. The second day will be a seminar that will consider how the MISRA guidelines support safety-related systems development in various industry sectors, and we are particularly keen to feature presentations of case studies. If you would like to speak at this seminar, please discuss your idea with me in the first instance.

Further details of the programme will be available in due course.

There will also be a small exhibition on the second day. Details of the exhibition are available from Joan Atkinson at the SCSC.

Print this item

  Joint MISRA/SCSC event 24-25 November 2010
Posted by: david ward - 14-07-2010, 02:05 PM - Forum: Announcements - No Replies

We are very pleased to announce that a tutorial and seminar in collaboration with the Safety-Critical Systems Club (SCSC) will be held on 24 and 25 November 2010 in London, UK. On the first day there will be two half-day tutorials, on the MISRA C and MISRA C++ guidelines for the use of these languages in critical systems. The second day will be a seminar that will consider how the MISRA guidelines support safety-related systems development in various industry sectors, and we are particularly keen to feature presentations of case studies. If you would like to speak at this seminar, please discuss your idea with me in the first instance.

Further details of the programme will be available in due course.

There will also be a small exhibition on the second day. Details of the exhibition are available from Joan Atkinson at the SCSC.

Print this item

  Rule 13.3 with respect to 0.0
Posted by: gs - 13-07-2010, 04:58 PM - Forum: 6.13 Control Statement Expressions - Replies (4)

Does rule 13.3 permit testing a floating point expression against 0.0?

Code:
void f( float flt )
{
if( flt == 0.0 )
    {}
}

If not, how is this test any different than
Code:
void f( float flt )
{
if( !flt )
    {}
}
?

Or does 13.3 not permit the second example either?

Print this item

Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,171
» Latest member: stephanmuench
» Forum threads: 998
» Forum posts: 2,752

Full Statistics

Online Users
There are currently 345 online users.
» 0 Member(s) | 343 Guest(s)
Bing, Google

Latest Threads
Rule 6.2.1: non-inline co...
Forum: 4.6 Basic concepts
Last Post: cgpzs
22-11-2024, 10:11 AM
» Replies: 0
» Views: 35
Rule 0.1.2
Forum: 4.0 Language independent issues
Last Post: stephanmuench
21-11-2024, 01:12 PM
» Replies: 0
» Views: 44
A18-9-4
Forum: AUTOSAR C++:2014 rules
Last Post: cgpzs
23-10-2024, 12:04 PM
» Replies: 2
» Views: 393
A8-4-5: are partial moves...
Forum: AUTOSAR C++:2014 rules
Last Post: misra cpp
22-10-2024, 02:03 PM
» Replies: 1
» Views: 336
model information blocks ...
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
22-10-2024, 01:27 PM
» Replies: 1
» Views: 4,459
MISRA AL SLSF - Rule 043I
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
22-10-2024, 01:11 PM
» Replies: 1
» Views: 8,875
MISRA AC EC guidelines
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 08:21 AM
» Replies: 4
» Views: 15,521
News on future releases
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 08:05 AM
» Replies: 1
» Views: 5,706
Signal naming convention ...
Forum: MISRA AC SLSF discussions
Last Post: misra-ac
21-10-2024, 07:57 AM
» Replies: 1
» Views: 7,258
Rule 7.0.2: operator cons...
Forum: 4.7 Standard conversions
Last Post: karos
14-10-2024, 08:52 PM
» Replies: 2
» Views: 447