Hey, I was wondering how (if it's even possible) to create my own compiler directives. Any help?

what compiler? what os? what kind of directives ? Do you mean pragmas or preprocessor directives or something else?

I use the compiler that comes with Visual C++, the os is vista. and by compiler directives I mean like when you use #define, #if, #endif... and so on. I have used compiler directives many times but really haven't taken a good look or thought much about them until today.

thank you very much. Now is there a compiler that will let me create them?
Would Dev let me?

Would Dev let me?

dev is a IDE not a compiler , the compiler that dev uses is the mingw.

thank you very much. Now is there a compiler that will let me create them?

can I know precisely why you need to implement a new #pragma
directive. for me I rarely use ( less than 10) pargma directives in
my whole life time. and g++ provides those most of the functionality on the link time using linker scripts.

what extractly you need to implement , may be there is a simple
way to do this. however the mingw is open source and you can
change anything. so for mingw the answer is yes. But honestly I don't know is there is a standard way to do this ( like adding a
module or a patch or something like this ).

Thank you that actually helped quite a bit and there really is no reason besides just the fact that I want to learn.

What you see today in the C pre-processor is a faint echo of how the pre-processor was originally implemented.

m4 is a macro pre-processor and then plenty.

The original C pre-processor (when C was still on a single machine in the 70's) was just an input to m4.

Oh, but you're on vista - that is unfortunate....

commented: m4 macro preprocessor ! Thanks for the suff , reading the wiki page. +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.