This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/6846] Full featured printf hooks


------- Additional Comments From rsa at us dot ibm dot com  2009-04-16 22:03 -------
Indeed,

  mod_DD = register_printf_modifier (L"DD");
  mod_D = register_printf_modifier (L"H");
  mod_D = register_printf_modifier (L"D");
  register_printf_specifier ('f', printf_dfp, d128_ais);
  register_printf_specifier ('f', printf_dfp, d32_ais);
  register_printf_specifier ('f', printf_dfp, d64_ais);

Does not work.  The most recently registered specifier still works.  So
performing printf("%Df\n",d64); works, but performing printf("%DDf\n",d128) or
printf("%Hf\n",d32) result in undefined behavior even though they work when when
registered individually.

I also verified that the following works and that 'f' is printed in both cases,
i.e. when 'D' doesn't match.

printf("%f\n",f);
register_printf_specifier('f',printf_dfp,d64_ais);
printf("%Df\n",d64);
printf("%f\n",f);

I also noticed that a 'spec', i.e. a specifier is still bound to a single character?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=6846

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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