This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Support for %d$c format specifier in diagnostics.c


Chiaki <ishikawa@yk.rim.or.jp> writes:

> Hi,
>
> I am trying to modify my patch along the line suggested by Zack Weinberg.
>
> In doing so, I have a couple of problems/questions due to my
> unfamiliarity with GCC source code and internal.
>
> - Zack mentioned that I could store the intermediate string
>    output later to obstack-supplied area.
>    I am not familiar with obstack. Is there a reference book on
>    obstack usage in general? Or better still, are there short succinct
>   usage of obstack allocated area that would be relevant here?

There's documentation of obstacks in the GNU libc manual.

There is existing use of obstacks in pretty-print.c and diagnostic.c
which is similar to what will need doing.

> - pretty-print.c supports 'wide' integers.

This is HOST_WIDE_INT, which is a typedef for something that might be
either 32 or 64 bits depending on conditions.  See hwint.h.  Since its
size is unpredictable, we have special format codes for it.  I don't
see why this causes trouble, since you don't have to save the actual
value passed on the stack anymore - that was one of the major points
of the change I proposed.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]