aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-pch.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-06-17 13:21:23 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-06-17 13:21:23 +0000
commit5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba (patch)
treea18365a2a12b66e43938e6451b9ef906434cd866 /gcc/c-pch.c
parent6958c7802c3e7e62f3f56a0b0319beed6879d7e8 (diff)
downloadgcc-5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba.zip
gcc-5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba.tar.gz
gcc-5eb4df45ce442bdb807cc674e45dbc31fdf3d4ba.tar.bz2
c-pch.c (get_ident): Don't set size of templ array.
./: * c-pch.c (get_ident): Don't set size of templ array. (pch_init): Don't set size of partial_pch array. * c-typeck.c (digest_init): If -Wc++-compat, warn about using a string constant to intialize an array whose size is the length of the string. testsuite/: * gcc.dg/Wcxx-compat-14.c: New testcase. From-SVN: r148611
Diffstat (limited to 'gcc/c-pch.c')
-rw-r--r--gcc/c-pch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-pch.c b/gcc/c-pch.c
index b4f7050..abdf4ab 100644
--- a/gcc/c-pch.c
+++ b/gcc/c-pch.c
@@ -1,5 +1,6 @@
/* Precompiled header implementation for the C languages.
- Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -92,7 +93,7 @@ static const char *
get_ident (void)
{
static char result[IDENT_LENGTH];
- static const char templ[IDENT_LENGTH] = "gpch.013";
+ static const char templ[] = "gpch.013";
static const char c_language_chars[] = "Co+O";
memcpy (result, templ, IDENT_LENGTH);
@@ -112,7 +113,7 @@ pch_init (void)
FILE *f;
struct c_pch_validity v;
void *target_validity;
- static const char partial_pch[IDENT_LENGTH] = "gpcWrite";
+ static const char partial_pch[] = "gpcWrite";
#ifdef ASM_COMMENT_START
if (flag_verbose_asm)