public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: Mumit Khan <khan@xraylith.wisc.edu>
Cc: egcs@cygnus.com
Subject: Re: Unrecog attribute func handling change request + patch
Date: Thu, 05 Feb 1998 22:09:00 -0000	[thread overview]
Message-ID: <24995.886741045@hurl.cygnus.com> (raw)
In-Reply-To: <9802022306.AA14407@modi.xraylith.wisc.edu>

  In message < 9802022306.AA14407@modi.xraylith.wisc.edu >you write:
  > While using a different stdio implementation that defines printf, etc
  > as macros, I ran into a problem where GCC flags unrecognized attribute
  > functions as errors. This seems rather too harsh, and I suggest warning
  > the user instead; after all, this is an extension.
  > 
  > To see the problem, use gas/as.h for example:
  > 
  >   #if (__GNUC__ >= 2) && !defined(VMS)
  >   /* for use with -Wformat */
  >   #define PRINTF_LIKE(FCN)  void FCN (const char *format, ...) \
  >                              __attribute__ ((format (printf, 1, 2)))
  >   #else 
  >   /* ... */
  >   #endif
  > 
  > SFIO (Safe/Fast I/O Library by David G. Korn and Kiem-Phong Vo) defines 
  > printf to be _stdprintf, so any code using this library and writing code 
  > like above, and there's lots of it, will fail.
  > 
  > Here's a patch:
  > 
  > Sun Feb  1 17:05:26 1998  Mumit Khan  <khan@xraylith.wisc.edu>
  > 	
  > 	* c-common.c (decl_attributes): Flag unrecognized attribute
  > 	functions as warnings instead of as errors.
I tend to agree that this shouldn't be an error...  I've seen somebody
that disagreed...    I've installed the patch, if we later think it should
be an error, we can always switch it back.

jeff

      parent reply	other threads:[~1998-02-05 22:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-02 17:14 Mumit Khan
1998-02-04  2:25 ` Andreas Schwab
1998-02-04  7:17   ` Mumit Khan
1998-02-05 22:09 ` Jeffrey A Law [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24995.886741045@hurl.cygnus.com \
    --to=law@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=khan@xraylith.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).