Pelles C forum

C language => Beginner questions => Topic started by: belimax on March 21, 2011, 09:12:47 PM

Title: Strange construct in source Tcconio library.
Post by: belimax on March 21, 2011, 09:12:47 PM
Hi,

The source tcconio.c contains the following line:

void tcconio_init( void ) __attribute__((constructor));

This compiles OK with LCC-WIN32 but I get this error with PellesC:

error #2001: Syntax error: expected ';' but found '__attribute__'.

My problem is that I don't understand this construct that should terminate with a ";" for me as for PellesC.

Does somebody can help me ?
Title: Re: Strange construct in source Tcconio library.
Post by: AlexN on March 22, 2011, 08:05:50 AM
AFAIK lcc-win32 has some extensions from C++ and __attribute__((constructor)) sounds for me like such an extension.  ???