Message-ID: <379D1351.B0774396@unb.ca> From: Endlisnis X-Mailer: Mozilla 4.51 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: __attribute__((unused)), gcc get's confused...? References: <379A22A6 DOT EDF69B49 AT unb DOT ca> <7nhl1s$bj2$1 AT nnrp1 DOT deja DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 33 Date: Tue, 27 Jul 1999 02:01:23 GMT NNTP-Posting-Host: 209.226.124.252 X-Trace: news21.bellglobal.com 933040883 209.226.124.252 (Mon, 26 Jul 1999 22:01:23 EDT) NNTP-Posting-Date: Mon, 26 Jul 1999 22:01:23 EDT Organization: Sympatico To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com awhite_bsfb AT my-deja DOT com wrote: > I am by far an expert on the use of the __attribute__ thingy, but I > know from experience that if I want to use the constructor/destructor > form, I have to do it on the function declaration, not definition (I > hope I got the terms right). > ie. > void MyProc( void ) __attribute__((constructor)); > void MyProc( void ) > { > printf( "Help!\n" ); > } That doesn't work either : int main(int argc __attribute__((unused)), char** argv); int main(int argc __attribute__((unused)), char** argv) { return 0; } b.cc(1) Error: parse error before `__attribute__' In function `int main(...)': b.cc(3) Error: parse error before `__attribute__' -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT HotMail DOT com ICQ: 32959047