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] Unknows Pragma
- Subject: [Frama-c-discuss] Unknows Pragma
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- Date: Fri, 28 May 2010 14:36:19 +0200
- In-reply-to: <4BFF8109.10903@tke.fi>
- References: <4BFF8109.10903@tke.fi>
> How do I get frama-c to understand these pragmas? > > #pragma LINK_INFO DERIVATIVE ? "MC9S12C32" > #pragma LINK_INFO OSCFREQUENCY "16000000" That's easy, if by "understand" you mean "ignore": grep them out at pre-processing (after pre-processing, in case these pragmas are found inside include files). Use the option: -cpp-command "gcc -C -E -I. - < %1 | grep -v pragma\ LINK_INFO > %2" in addition to what you were already doing. You may find that the option -cpp-command does not handle the tokens %1 and %2 as documented. That's an unfortunate bug. But since you are already setting yourself up for compiling Frama-C from sources with your exotic target architecture, it won't be too much additional trouble to apply the following patch : --- src/kernel/file.ml (revision 8516) +++ src/kernel/file.ml (working copy) @@ -498,7 +498,7 @@ in (* Format.eprintf "-cpp-command cmd2=|%s|@\n" cmd2; *) let cmd3 = - String.sub cmdl (percent2 + 2) (String.length cmdl - percent2 + 2) + String.sub cmdl (percent2 + 2) (String.length cmdl - (percent2 + 2)) in (* Format.eprintf "-cpp-command cmd3=|%s|@\n" cmd3; *) Format.sprintf "%s%s %s %s%s%s" cmd1
- Follow-Ups:
- [Frama-c-discuss] Unknows Pragma
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [Frama-c-discuss] Unknows Pragma
- From: patrik.nylund at tke.fi (Patrik Nylund)
- [Frama-c-discuss] Unknows Pragma
- References:
- [Frama-c-discuss] Unknows Pragma
- From: patrik.nylund at tke.fi (Patrik Nylund)
- [Frama-c-discuss] Unknows Pragma
- Prev by Date: [Frama-c-discuss] Non-terminating loops
- Next by Date: [Frama-c-discuss] Non-terminating loops
- Previous by thread: [Frama-c-discuss] Unknows Pragma
- Next by thread: [Frama-c-discuss] Unknows Pragma
- Index(es):