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,196
» Latest member: galibl1
» Forum threads: 1,008
» Forum posts: 2,779

Full Statistics

Online Users
There are currently 266 online users.
» 0 Member(s) | 263 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