public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Cc: egcs@cygnus.com, wilson@cygnus.com
Subject: Re: egcs-980315, gen*.c system.h and fatal() using stdarg/varargs
Date: Fri, 20 Mar 1998 08:45:00 -0000	[thread overview]
Message-ID: <16591.890361888@hurl.cygnus.com> (raw)
In-Reply-To: <199803200208.VAA11947@caip.rutgers.edu>

  In message < 199803200208.VAA11947@caip.rutgers.edu >you write:
  > 	Here is my patch to add system.h to gen*.c.  It also fixes the
  > static function `fatal' to use real variable argument parameter lists.
  > 
  > 	Is so doing, I uncovered some format specifier problems in
  > genattrtab.c:
  > 
  >  > ./genattrtab.c:979: warning: char format, rtx_def arg (arg 2)
  >  > ./genattrtab.c:984: warning: char format, rtx_def arg (arg 2)
  >  > ./genattrtab.c:1001: warning: char format, rtx_def arg (arg 2)
  >  > ./genattrtab.c:1012: warning: char format, rtx_def arg (arg 2)
  >  > ./genattrtab.c:1012: warning: char format, rtx_def arg (arg 3)
  > 
  > 	All of these cases appear to be using a %s to print a XEXP(rtx,N).
  > Should these instead be changed to %s and XSTR(rtx,N) ?
Hard to be sure since the line #s do not match what's currently in
the sources.

I see 5 cases in "check_attr_test" which appear to fit the description
you've given.  Those should be using XSTR, not XINT as you suspected.

  > 	One other thing, I defined a PRINTF_ATTRIBUTE macro in
  > system.h along the lines of a similar trick in cccp.c.  However I'm
  > not sure that system.h is the right place for this.
It's as good a place as any.

  > 	I envision system.h as handling system header files, functions,
  > macros and related issues.  It seems like __attribute__, being a
  > compiler characteristic, is something for which gansidecl.h is to be
  > used for.  (Also along these lines, the bcopy/index stuff should be
  > removed from gansidecl.h now that system.h handles that.  But that's for
  > another day.)
That would be fine too.

I don't have a particular preference for where this would belong.

For the "fatal" problem -- I don't think you can rely on having
vfprintf.  You have to check for it.  If you don't have it, you'll
probably have to punt back to extracting the args as ints and
passing them to fprintf.


I would recommend checking in the changes *without* the fatal change;
then re-submit the changes for just fatal as a separate patch.

jeff

  reply	other threads:[~1998-03-20  8:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-20  8:45 Kaveh R. Ghazi
1998-03-20  8:45 ` Jeffrey A Law [this message]
1998-03-24 10:24 Kaveh R. Ghazi
1998-03-24 11:16 Kaveh R. Ghazi
1998-03-24 11:16 ` Jeffrey A Law
1998-03-25  7:49 ` Robert Lipe
1998-03-25 16:30   ` Jeffrey A Law
1998-03-27 15:18 ` Richard Henderson
1998-03-24 14:49 Kaveh R. Ghazi
1998-03-25 17:05 Kaveh R. Ghazi
1998-03-27 15:18 ` H.J. Lu
1998-03-27 15:18 ` Jeffrey A Law
1998-03-26 21:54 Kaveh R. Ghazi
1998-03-27  4:21 ` Jeffrey A Law
1998-03-28 19:24   ` H.J. Lu
1998-03-26 21:54 Kaveh R. Ghazi
1998-03-29  5:14 ` John Carr
1998-03-27 15:18 Kaveh R. Ghazi
1998-03-27  4:21 ` Richard Henderson
1998-03-30 16:18 Kaveh R. Ghazi

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=16591.890361888@hurl.cygnus.com \
    --to=law@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=ghazi@caip.rutgers.edu \
    --cc=wilson@cygnus.com \
    /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).