Clean up use of CHARS in dbxout.c

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Wed Jul 25 18:53:00 GMT 2001


    You're probably better off creating dbx_putc, dbx_puts, and
    dbx_printf functions that update the count simultaneously.

Not clear how much effort that's worth, but it's a good point.  I'll
put it on my list.

    Also, it'd be nice to use the return value of fprintf in
    print_wide_int.  We might possibly need to autoconf that
    usage for ancient systems, but it is part of C89 so we can
    elide the redundant divide loop basically everywhere.

I did find one system where fprintf isn't documented as returning a value
and we don't rely on that anywhere else in GCC, so I'm not sure it would
be worth adding that autoconf machinery and also having two mechanisms in
dbxout.c for both cases just to avoid an extra loop in relatively rare
cases (most of the integers output are small).



More information about the Gcc-patches mailing list