summaryrefslogtreecommitdiff
path: root/gcc/intl.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-29 04:39:16 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-29 04:39:16 +0000
commitc768b48b8d38dca97809ea1dc72de2cebd05b6c6 (patch)
tree2b48e3a63388183c42752ae73ac281a65cd85dd7 /gcc/intl.c
parenta0a1d5635c8086d6a7e16e38b6f533da669678d8 (diff)
downloadgcc-c768b48b8d38dca97809ea1dc72de2cebd05b6c6.tar.gz
* alloc-pool.c (create_alloc_pool): Fix -Wc++-compat warnings.
* df-scan.c (df_notes_rescan): Likewise. * ggc-page.c (set_page_table_entry): Likewise. * intl.c (gcc_gettext_width): Likewise. * varasm.c (get_unnamed_section, get_noswitch_section, get_section): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/intl.c')
-rw-r--r--gcc/intl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/intl.c b/gcc/intl.c
index f76dbada97b..dfc015d2123 100644
--- a/gcc/intl.c
+++ b/gcc/intl.c
@@ -91,7 +91,7 @@ size_t
gcc_gettext_width (const char *msgstr)
{
size_t nwcs = mbstowcs (0, msgstr, 0);
- wchar_t *wmsgstr = alloca ((nwcs + 1) * sizeof (wchar_t));
+ wchar_t *wmsgstr = XALLOCAVEC (wchar_t, nwcs + 1);
mbstowcs (wmsgstr, msgstr, nwcs + 1);
return wcswidth (wmsgstr, nwcs);