From 7a9430c092d4b224dc946274119561a027da61f1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 8 Jun 2005 17:28:39 +0100 Subject: [PATCH] sol2-c.c (cmn_err_char_table): Allow width for %b formats. * config/sol2-c.c (cmn_err_char_table): Allow width for %b formats. testsuite: * gcc.dg/format/cmn_err-1.c: Update. From-SVN: r100763 --- gcc/ChangeLog | 5 +++++ gcc/config/sol2-c.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/format/cmn-err-1.c | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d0c330504306..9ad8e4434c08 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-06-08 Joseph S. Myers + + * config/sol2-c.c (cmn_err_char_table): Allow width for %b + formats. + 2005-06-08 James A. Morrison PR target/20666 diff --git a/gcc/config/sol2-c.c b/gcc/config/sol2-c.c index 330f1ca3c2ff..e0fb26252d75 100644 --- a/gcc/config/sol2-c.c +++ b/gcc/config/sol2-c.c @@ -66,7 +66,7 @@ static const format_char_info cmn_err_char_table[] = { "c", 0, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "", NULL }, { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "c", NULL }, { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "cR", NULL }, - { "b", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", &bitfield_string_type }, + { "b", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "", &bitfield_string_type }, { NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL } }; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c3bdb1b54f91..0facf7fb1f73 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-06-08 Joseph S. Myers + + * gcc.dg/format/cmn_err-1.c: Update. + 2005-06-08 James A. Morrison PR target/20666 diff --git a/gcc/testsuite/gcc.dg/format/cmn-err-1.c b/gcc/testsuite/gcc.dg/format/cmn-err-1.c index 3fb2fd2ff460..5da83c451291 100644 --- a/gcc/testsuite/gcc.dg/format/cmn-err-1.c +++ b/gcc/testsuite/gcc.dg/format/cmn-err-1.c @@ -25,6 +25,7 @@ int main() ll, ll, ll, ll, ll, ll, ll); cmn_err_func (0, "%b %s", i, "\01Foo", string); cmn_err_func (0, "%p", string); + cmn_err_func (0, "%16b", i, "\01Foo"); cmn_err_func (0, "%i", i); /* { dg-error "unknown|too many" } */ cmn_err_func (0, "%d", l); /* { dg-error "expects type" } */ -- 2.43.5