Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] definition of \base_addr


  • Subject: [Frama-c-discuss] definition of \base_addr
  • From: jens.gerlach at first.fraunhofer.de (Jens Gerlach)
  • Date: Wed Nov 26 21:53:01 2008

Hi,

the definition of \base_addr reads "returns the base address of an  
allocated pointer".
I assume that for global or local variable a of type int a[4] holds:
	\base_addr(&a[3]) = \base_addr(a+3) = \base_addr(a)

But what if we define

struct X {
     int b[4];
};

X x[5];

What is then the value of
	\base_addr(&(x[2].b[1])) ?
Is it
	&(x[2].b[0]) ( which I think is equal to x+2)
or
	&(x[0].b[0]) (which I think is equal to x)
?

Thanks in advance.

Jens