tmsimont
tmsimont

Reputation: 2711

What appears between a return type and function name in a C function declaration?

I understand what a basic C function declaration means:

return_type function_name(args) { ... }

However, when I was working on a project that I did not write I found a strange declaration that is used repeatedly. I do not understand what it means.

Here's an example:

int C74_EXPORT main(void)
{
   ...  
}

What is that C74_EXPORT? What does it do, and what is this word called?

Upvotes: 5

Views: 499

Answers (1)

unwind
unwind

Reputation: 399813

That's not standard, so it's hard to answer in general.

It's probably a preprocessor macro, which gets replaced by something. That "something" can be compiler-dependent, it usually is.

You should read the preprocessed code to figure this out, or check the Makefile or other build artefacts for a definition of `C74_EXPORT".

Upvotes: 6

Related Questions