diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-12-11 19:42:34 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-12-11 19:42:34 +0000 |
commit | 9aa8a1df0506a9622fea14f7c28b73fdd5324f8e (patch) | |
tree | 2018e6f82b3ca5d8eb854a0d321eb3e9f7091dea /gcc/c-common.c | |
parent | 0afeef64be52defd45b00c47464183dd43381725 (diff) | |
download | gcc-9aa8a1df0506a9622fea14f7c28b73fdd5324f8e.zip gcc-9aa8a1df0506a9622fea14f7c28b73fdd5324f8e.tar.gz gcc-9aa8a1df0506a9622fea14f7c28b73fdd5324f8e.tar.bz2 |
c-common.c (combine_strings): Complain if concatenating __FUNCTION__.
* c-common.c (combine_strings): Complain if concatenating
__FUNCTION__.
* c-parse.in (yylexname): Flag artificial strings.
* tree.h (TREE_ARTIFICIAL_STRING_P): New.
doc:
* extend.texi: Update.
testsuite:
* gcc.dg/concat.c: New test.
From-SVN: r47890
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index ad58594..96f8462 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -544,7 +544,11 @@ combine_strings (strings) wide_flag = 1; } else - length += (TREE_STRING_LENGTH (t) - 1); + { + length += (TREE_STRING_LENGTH (t) - 1); + if (C_ARTIFICIAL_STRING_P (t) && !in_system_header) + warning ("concatenation of string literals with __FUNCTION__ is deprecated. This feature will be removed in future"); + } } /* If anything is wide, the non-wides will be converted, |