Re: Using custom qualifiers like __THROW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanx michal017@xxxxxxxxxx, Rupert Wood and others for your responses

Eljay Love-Jensen wrote:

>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.

If square_func is not valid C or C++ syntax then the same property of invalid
C/C++ syntax should apply to

extern int fcloseall(void) __THROW;

 which should expand to

extern int fcloseall(void) throw();

When I declare square_func(int) as

int square_func(int) __THROW;

then the code compiles fine with gcc

"m" <michal017@xxxxxxxxxx> wrote:

>Isn't throw() or throw a reserved keyword?
>You can't override int or char or bool or void.. so you can't override throw.. ;)
>That's how I understand it..

My question is according to the 'C' language valid forms of function declarations are:

<storage-class-type> <return-type> <function-name>(<parameter type list>);

But then

extern int fcloseall(void) __THROW;

does'nt seem to fit into this syntax.

If terms like __THROW are allowed then is it possible to use custom defined
macros like __SNODX? If only a set of reserved terms are permitted as m pointed out
then where is the list of these terms?

Thanx in advance.

Eagerly awaiting responses.

SNODX


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux