]> gcc.gnu.org Git - gcc.git/commit
c-typeck.c (digest_init): Don't allow arrays of signed or unsigned variants of wchar_...
authorJoseph Myers <jsm@polyomino.org.uk>
Sun, 25 Jul 2004 09:12:21 +0000 (10:12 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sun, 25 Jul 2004 09:12:21 +0000 (10:12 +0100)
commit197463ae905f0ce7c8dbeb298531a71855ac973e
tree679b0177e461b3f53a6306601674dd0b3935125b
parentb785f485ecfa4a4685e30b3385b701159726f4a3
c-typeck.c (digest_init): Don't allow arrays of signed or unsigned variants of wchar_t to be initialized...

* c-typeck.c (digest_init): Don't allow arrays of signed or
unsigned variants of wchar_t to be initialized by wide string
constants.  Do allow arrays of enumerated types compatible with
wchar_t to be initialized by wide string constants.  Refine tests
distinguishing wide and narrow strings and arrays.  Give specific
error for arrays of other integer types initialized by string
constants.
(output_init_element, process_init_element): Check for
INTEGRAL_TYPE_P rather than just for INTEGER_TYPE when
initializing with string constants.

testsuite:
* gcc.dg/init-string-2.c: New test.

From-SVN: r85146
gcc/ChangeLog
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/init-string-2.c [new file with mode: 0644]
This page took 0.061937 seconds and 5 git commands to generate.