OSDN Git Service

* c-common.c (format_wanted_type): Add reading_from_flag.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2000 07:40:45 +0000 (07:40 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2000 07:40:45 +0000 (07:40 +0000)
commit21da11cdfae937f122761d4d418b72a74b72897d
treeb240467cf5021de53c1a5fc93a3f6ef62f2878e3
parent8f9fbe999d29a7d1142a0f932ff06c4cf73887cb
* c-common.c (format_wanted_type): Add reading_from_flag.
(print_char_table): Mark %s and %S formats with flag "R".
(check_format_info_main): Set up reading_from_flag appropriately.
If aflag, always set writing_in_flag rather than relying on the
format used being a scanf format and so having it set.
(check_format_types): Check for formats reading through null
pointers.

testsuite:
* gcc.dg/c90-printf-1.c: Add test for printf formats reading
through a null pointer.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38104 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c90-printf-1.c