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: Using custom qualifiers like __THROW


Hi Snodx,

>After studying a bit I came to know that it actually expands to the function throw()

You need to do some more studying, since it does not expand to the function "throw()".

It expands to the function decoration "throw()" in C++ compiles, and to nothing for C compiles.

>I am getting the following compile-time errors

Your macro magic expand to...

int square_func(int) void snodx() { return; }; //LINE 5

...which is not valid C or C++.  If you want, you could make your own computer programming language where this is a valid syntax.

HTH,
--Eljay 


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