diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2003-06-13 14:08:36 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-06-13 14:08:36 +0000 |
commit | 3af0187c28292970aeed9617981cc342f0b671f9 (patch) | |
tree | 640849fd53a0a0c26a543df3120bbbbda7ce5532 /gcc/testsuite/gcc.dg/format | |
parent | 281b1732009a40b65dc8d9934cdebe61fe75f727 (diff) | |
download | gcc-3af0187c28292970aeed9617981cc342f0b671f9.zip gcc-3af0187c28292970aeed9617981cc342f0b671f9.tar.gz gcc-3af0187c28292970aeed9617981cc342f0b671f9.tar.bz2 |
c-format.c (format_types_orig): Disallow '*' width/precision in asm_fprintf format checks.
gcc:
* c-format.c (format_types_orig): Disallow '*' width/precision in
asm_fprintf format checks.
testsuite:
* gcc.dg/format/asm_fprintf-1.c: Update width/precision checks.
From-SVN: r67897
Diffstat (limited to 'gcc/testsuite/gcc.dg/format')
-rw-r--r-- | gcc/testsuite/gcc.dg/format/asm_fprintf-1.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-1.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-1.c index 472c2d8..22173df 100644 --- a/gcc/testsuite/gcc.dg/format/asm_fprintf-1.c +++ b/gcc/testsuite/gcc.dg/format/asm_fprintf-1.c @@ -34,9 +34,6 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p, asm_fprintf ("%.7d\n", i); asm_fprintf ("%+9.4d\n", i); asm_fprintf ("%.3ld\n", l); - asm_fprintf ("%*d\n", i1, i); - asm_fprintf ("%.*d\n", i2, i); - asm_fprintf ("%*.*ld\n", i1, i2, l); asm_fprintf ("%d %lu\n", i, ul); /* Extensions provided in asm_fprintf. */ @@ -58,8 +55,9 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p, asm_fprintf ("%d", l); /* { dg-warning "format" "bad argument types" } */ asm_fprintf ("%wd", l); /* { dg-warning "format" "bad argument types" } */ asm_fprintf ("%d", ll); /* { dg-warning "format" "bad argument types" } */ - asm_fprintf ("%*.*d", l, i2, i); /* { dg-warning "field" "bad * argument types" } */ - asm_fprintf ("%*.*d", i1, l, i); /* { dg-warning "field" "bad * argument types" } */ + asm_fprintf ("%*d\n", i1, i); /* { dg-warning "format" "bad * argument types" } */ + asm_fprintf ("%.*d\n", i2, i); /* { dg-warning "format" "bad * argument types" } */ + asm_fprintf ("%*.*ld\n", i1, i2, l); /* { dg-warning "format" "bad * argument types" } */ asm_fprintf ("%ld", i); /* { dg-warning "format" "bad argument types" } */ asm_fprintf ("%s", n); /* { dg-warning "format" "bad argument types" } */ |