libio bugs

Andreas Schwab schwab@issan.informatik.uni-dortmund.de
Wed Feb 11 04:23:00 GMT 1998


Mark Mitchell <mmitchell@usa.net> writes:

|>>>>>> "Andreas" == Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:

|>     Andreas> Mark Mitchell <mmitchell@usa.net> writes:

|>     Andreas> |> Ah, I see.  But initializer labels are a g++
|>     Andreas> extension.  Perhaps it |> would be simpler simply to
|>     Andreas> issue an error message on any use of |> initializer
|>     Andreas> labels?

|>     Andreas> That would probably the best until G++ is fixed, or the
|>     Andreas> new C9x way of doing it is implemented (which is already
|>     Andreas> partly implemented in the C frontend).

|>     Andreas> |> Is the point of this to allow out-of-order |>
|>     Andreas> initialization of the members?

|> I'm about to submit a patch that disables initializer labels in C++
|> (since they are a non-working non-standard extension), and remove the
|> uses of them in libio.  Is that OK?  Are there problems with
|> link-compatibility, i.e., does naming the fields in struct printf_info
|> make sure that they are initialized in some order different than the
|> order that would be specified by the usual initialization syntax?  (I
|> note that the current initialization order is exactly the same as that
|> in GLIBC 2.)

The current development version of glibc 2 adds another bitfield before
the last field in struct printf_info, it now looks like this (is_char is
new):

struct printf_info
{
  int prec;			/* Precision.  */
  int width;			/* Width.  */
  wchar_t spec;			/* Format letter.  */
  unsigned int is_long_double:1;/* L flag.  */
  unsigned int is_short:1;	/* h flag.  */
  unsigned int is_long:1;	/* l flag.  */
  unsigned int alt:1;		/* # flag.  */
  unsigned int space:1;		/* Space flag.  */
  unsigned int left:1;		/* - flag.  */
  unsigned int showsign:1;	/* + flag.  */
  unsigned int group:1;		/* ' flag.  */
  unsigned int extra:1;		/* For special use.  */
  unsigned int is_char:1;	/* hh flag.  */
  wchar_t pad;			/* Padding character.  */
};


-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org



More information about the Gcc mailing list