delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/25/18:00:28

Message-ID: <379B132F.5B7C854D@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> <7negc9$1mh$2 AT news DOT luth DOT se>
Lines: 31
Date: Sun, 25 Jul 1999 13:36:09 GMT
NNTP-Posting-Host: 209.226.124.230
X-Trace: news20.bellglobal.com 932909769 209.226.124.230 (Sun, 25 Jul 1999 09:36:09 EDT)
NNTP-Posting-Date: Sun, 25 Jul 1999 09:36:09 EDT
Organization: Sympatico
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Martin Str|mberg wrote:

> 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)
> : {}
> :
> : Produces this output: when run through gxx with "-W -Wall" switches:
> : Lemur.cc:14: warning: `unused' attribute ignored
> : Lemur.cc:15: warning: `unused' attribute ignored
> :
> : Can somebody tell me what I'm doing wrong, or what I have to fix to make
> : gcc/gxx ignore an unused parameter?
> Why not take away "__attribute__((unused))"? Do you get any warnings
> then?

    Yes, I still get these warnings (because -Wunused is part of -W -Wall).
Lemur.cc:14: warning: unused parameter `char * _argument'
Lemur.cc:15: warning: unused parameter `char * _app_name'

    I'm starting to think this is a bug in DJGPP (I've tried somthing similar in
gcc for HP-UX and it worked as I expected).
--
     (\/) 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