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: - Share what you know. Learn what you don't.
Lines: 28
Message-ID: <7nhl1s$bj2$>
References: <379A22A6 DOT EDF69B49 AT unb DOT ca>
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 (Squid/1.1.22) for client
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

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).

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
Share what you know. Learn what you don't.

- Raw text -

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