delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/30/11:15:26

Message-ID: <379D1351.B0774396@unb.ca>
From: Endlisnis <s257m AT unb DOT ca>
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>
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019