Definition of "object"

Moderators: misra-c, david ward

Posts: 1
Joined: Fri Feb 01, 2019 5:58 am
Company: Nidec

Definition of "object"

Postby mz99 » Wed Apr 17, 2019 1:21 am

The word "object" is used in some rules of MISRA-C:2012. (e.g. Rule-8.9)
What is the definition of "object" in MISRA-C:2012?
Which of the following are considered as "object" in MISRA-C:2012?

  • Variable
  • Const-qualified variable
  • Function
  • Object-like macro
  • Function-like macro

Posts: 108
Joined: Wed Apr 27, 2016 2:33 pm
Company: Elektrobit Automotive GmbH

Re: Definition of "object"

Postby dg1980 » Wed Apr 17, 2019 6:05 am

First sentence here:
Anything else would really surprise me:) - but let's wait for an official reply.

Posts: 1
Joined: Mon Aug 29, 2016 4:15 am
Company: Yazaki Corp

Re: Definition of "object"

Postby twakita » Tue Apr 23, 2019 2:49 am

(This is not offical reply from MISRA)

"object" is defined in ISO-C. (MISRA C is a subset of ISO-C.)

object (ISO/IEC 9899 section 3.14):
region of data storage in the execution environment,
the contents of which can represent values (1)(2)

Mostlikely, "object" meanings RAM area which is assigned for a variable.

-- refs --
(1) ISO/IEC 9899: 1990,Programming languages ― C, ISO, 1990
(2) ISO/IEC 9899: 1990,Programming languages ― C, ISO, 1999

Return to “8.8 Declarations and defnitions”

Who is online

Users browsing this forum: No registered users and 0 guests