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: Thu, 3 Jun 2010 09:22:13 +0200
- In-reply-to: <4C074751.9080300@tke.fi>
- References: <4BFF8109.10903@tke.fi> <AANLkTinL1AJ0k0C_7D6wqlIEe3uBWvLTy5IxzKzc7lIU@mail.gmail.com> <4C038E06.902@tke.fi> <20100531124550.4fa8f086@is010235> <4C05F087.8000300@tke.fi> <AANLkTil11ZhTiw5o2tngZvYTfyxwDyaJyprUSvMjKuBp@mail.gmail.com> <AANLkTilpTZV17peqdrZyfirb6s6RBraKhngUGCNd7DW5@mail.gmail.com> <4C074751.9080300@tke.fi>
Hello, > How can we make it working with this? > > extern volatile PORTABSTR _PORTAB @(REG_BASE + 0x00000000); If you only wish to remove the "@(...)" part, that's very possible. I realise though that this may turn my small pre-processor into a full-fledged implementation of the commanline utility sed[1] and that perhaps sed was the program to use from the beginning. Let's just combine the two for the time being: ___ #pragma bar #pragma foo #pragma zut #pragma LINK_INFO blah, blah extern volatile int _PORTAB @(REG_BASE + 0x00000000); int main() { return 0; /* hopefully all goes well. */ } ___ bin/toplevel.opt -cpp-command "gcc -C -E -I. %1 | gr | sed -e s/@\\(.*\\)//g > %2" -print test.c The output of gcc is sent to gr, and the output of gr is sent to the sed command s/@\(.*\)//g The blackslashes in the later command needs to be escaped when inside the double quotes of the Frama-C commandline, but this command simply replaces strings that match @(...) with nothing. Hopefully you do not have occurrences of this pattern that mustn't be suppressed in your source code? Pascal [1] http://www.grymoire.com/Unix/Sed.html
- References:
- [Frama-c-discuss] Unknows Pragma
- From: patrik.nylund at tke.fi (Patrik Nylund)
- [Frama-c-discuss] Unknows Pragma
- From: pascal.cuoq at gmail.com (Pascal Cuoq)
- [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
- Prev by Date: [Frama-c-discuss] Unknows Pragma
- Next by Date: [Frama-c-discuss] bug in value analysis of programs with floating-point computations
- Previous by thread: [Frama-c-discuss] Unknows Pragma
- Next by thread: [Frama-c-discuss] bug in value analysis of programs with floating-point computations
- Index(es):