delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/26/09:21:06

From: awhite_bsfb AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: __attribute__((unused)), gcc get's confused...?
Date: Mon, 26 Jul 1999 12:41:32 GMT
Organization: Deja.com - Share what you know. Learn what you don't.
Lines: 28
Message-ID: <7nhl1s$bj2$1@nnrp1.deja.com>
References: <379A22A6 DOT EDF69B49 AT unb DOT ca>
NNTP-Posting-Host: 208.249.243.3
X-Article-Creation-Date: Mon Jul 26 12:41:32 1999 GMT
X-Http-User-Agent: Mozilla/4.06 [en] (Win98; I)
X-Http-Proxy: 1.0 x28.deja.com:80 (Squid/1.1.22) for client 208.249.243.3
X-MyDeja-Info: XMYDJUIDawhite_bsfb
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <379A22A6 DOT EDF69B49 AT unb DOT ca>,
  Endlisnis <s257m AT unb DOT ca> wrote:
> I'm having a problem with unused parameters.  This code:
> char **__crt0_glob_function (__attribute__((unused)) char * _argument)
> {return 0;}
> void   __crt0_load_environment_file(__attribute__((unused)) char
*_app_name)

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" );
}

So try:

char **__crt0_glob_function (__attribute__((unused)) char * _argument);
char **__crt0_glob_function ( char *_argument ){return 0;}


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

- Raw text -


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