I am wondering if this code H.add h "_Static_assert" (voidType, [ TInt
(IBool, []); charConstPtrType ], false);  will match

_Static_assert ((*sizeof* (backup_args) / *sizeof* *(backup_args)) == (
*sizeof* (backup_types) / *sizeof* *(backup_types)) + 1, "verify ("
"ARRAY_CARDINALITY
(backup_args) == ARRAY_CARDINALITY (backup_types) + 1" ")");

because after adding that code to Cil.c ,   Cill still won't recognize
_Static_assert.   The only place where I can find a reference to
_Static_assert is in /usr/include/assert.h , but it 's not enough for me to
determine its parameters.

Vu

On Tue, Oct 6, 2015 at 3:44 PM, ThanhVu (Vu) Nguyen <
nguyenthanh...@gmail.com> wrote:

> I've added this line right above
>
> H.add h "__builtin___fprintf_chk" (intType, [ voidPtrType; intType;
> charConstPtrType ], true) (* first argument is really FILE*, not void*, but
> we don't want to build in th ...
>
> Then recompile cil,  then recompile coreutils but still got the same error
> at the same location.
>
> Vu
>
> On Tue, Oct 6, 2015 at 3:09 PM, Gabriel Kerneis <gabr...@kerneis.info>
> wrote:
>
>> Le 2015-10-06 20:55, ThanhVu (Vu) Nguyen a écrit :
>>
>>> _Static_assert ((SIZEOF (backup_args) / SIZEOF *(backup_args)) ==
>>> (SIZEOF (backup_types) / SIZEOF *(backup_types)) + 1, "verify ("
>>> "ARRAY_CARDINALITY (backup_args) == ARRAY_CARDINALITY (backup_types) +
>>> 1" ")");
>>>
>>
>> _Static_assert seems to be introduced by C11, which CIL does not support.
>> I'm not really sure how hard it would be to add: from CIL's point of view,
>> it seems to be nothing more than a function taking a bool and a string as
>> parameter, but I might be missing something.
>>
>> You could try editing cil.ml around that line:
>>
>>
>> https://github.com/cil-project/cil/blob/d9d6a08b8017dea996f3f6a4eef07dc017682d6d/src/cil.ml#L2847
>>
>> to add something like:
>>
>> H.add h "_Static_assert" (voidType, [ TInt (IBool, []); charConstPtrType
>> ], false);
>>
>> Best,
>> --
>> Gabriel
>>
>
>
------------------------------------------------------------------------------
Full-scale, agent-less Infrastructure Monitoring from a single dashboard
Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
Physical-Virtual-Cloud Infrastructure monitoring from one console
Real user monitoring with APM Insights and performance trend reports 
Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to