This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.


Yes, I am experimenting with GCC 4.1.2 but later will love to work on
plugins. I was able to write a simple GCC pass to print the below
message:

Linux:>/x/local/prakash_prasad/gcc-4.1.2/temp/usr/local/bin 1049> ./g++ test.cpp
This is a test message.
Linux:>/x/local/prakash_prasad/gcc-4.1.2/temp/usr/local/bin 1050>

And below is my new pass structure declaration:

struct my_new_gcc_pass =
{
   "my_pass",
   NULL,
   my_execute,
   NULL,
   NULL,
   0,
   0,
   0,
   0,
   0,
   0,
   0,
   0
};

Basically in my_execute method I have a fprintf stdout call.

My knowledge about GCC pass is at 0th level or mere - I would like to
learn more and implement my requirement - please let me know where can
I get details of how to add printf statements of type I had mentioned
earlier.

Regards,
Prakash

On Tue, Feb 14, 2012 at 12:36 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 14 February 2012 20:33, Satya Prakash Prasad wrote:
>> Sorry I am just a beginner. It should be a new GCC pass.
>
> Then if you're not planning to write it as a plugin you don't need to
> use GCC 4.5 or later.
>
> You could write a new pass for GCC 4.1, but it's not easy.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]