[Bug c/64862] printf attribute should accept other string types

2019-01-11 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

--- Comment #10 from Tom Tromey  ---
Also I think all the test suite changes never really worked.

[Bug c/64862] printf attribute should accept other string types

2019-01-11 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

--- Comment #9 from Tom Tromey  ---
Created attachment 45413
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45413=edit
ancient patch

[Bug c/64862] printf attribute should accept other string types

2019-01-11 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

--- Comment #8 from Tom Tromey  ---
Sorry about the extreme delay on this.
I think my patch has long since bit-rotted, but I can attach it for
reference.  I believe my assignment situation got sorted out so this
should be fine to read and/or copy from.

[Bug c/64862] printf attribute should accept other string types

2018-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #7 from Martin Sebor  ---
Any progress?

[Bug c/64862] printf attribute should accept other string types

2016-01-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-24
Version|unknown |5.0
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #6 from Andrew Pinski  ---
(In reply to Tom Tromey from comment #5)
> I still have to get a new copyright assignment.
> And the test cases are being a pain to update.

How is the copyright assignment coming?

[Bug c/64862] printf attribute should accept other string types

2015-02-20 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

--- Comment #5 from Tom Tromey tromey at gcc dot gnu.org ---
I have a patch for this.  I think it fixes bug 38308 and bug 20110
as well.  It works by adding a new function to libcpp to convert
a string back to the source charset.

I still have to get a new copyright assignment.
And the test cases are being a pain to update.


[Bug c/64862] printf attribute should accept other string types

2015-01-29 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

--- Comment #2 from Tom Tromey tromey at gcc dot gnu.org ---
Naturally my example was wrong.
Sorry about that.  But gcc still doesn't handle it:

#include stdarg.h
#include uchar.h

extern void p (const char16_t *fmt, ...)
  __attribute__((format (__printf__, 1, 2)));

void f()
{
  p (u%s %d, 23, hi);
}



... with gcc saying:

r.cc:5:44: error: format string argument is not a string type
   __attribute__((format (__printf__, 1, 2)));
^


[Bug c/64862] printf attribute should accept other string types

2015-01-29 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

--- Comment #1 from Andreas Schwab sch...@linux-m68k.org ---
glibc has this in wchar.h:

extern int wprintf (const wchar_t *__restrict __format, ...)
 /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;


[Bug c/64862] printf attribute should accept other string types

2015-01-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

 Depends on||38308

--- Comment #3 from Andrew Pinski pinskia at gcc dot gnu.org ---
wchar_t part was filed as bug 38308 a long time ago.


[Bug c/64862] printf attribute should accept other string types

2015-01-29 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64862

--- Comment #4 from joseph at codesourcery dot com joseph at codesourcery dot 
com ---
Note also that gcc.dg/format tests are run both with and without -DWIDE - 
the intent there is that wide string formats should be tested, when 
supported, with essentially the same tests as narrow string formats (via 
appropriate macros to make the tests generic, e.g. wrapping format strings 
in a macro L()).  That could be applied to other string types as well by 
running the tests more than twice.