summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/dollar.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-17 20:29:34 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-17 20:29:34 +0000
commit14e33bb6ace95d45b944fbb338d283c56a191829 (patch)
treecc833b5eaad739137055c876d152a481427bc136 /gcc/testsuite/gcc.dg/dollar.c
parente2ed735081cb6afa3e84face71425c537433b781 (diff)
downloadgcc-14e33bb6ace95d45b944fbb338d283c56a191829.tar.gz
* c-common.c, c-common.h (dollars_in_ident): Remove.
* c-opts.c (DOLLARS_IN_IDENTIFIERS): Default to true. (c_common_init_options, c_common_decode_option): Set dollars_in_ident. * cpphash.h (warned_dollar): Rename warn_dollars. * cppinit.c (struct lang_flags, lang_defaults, cpp_set_lang) Permit dollars regardless of -std=. (post_options): Set warn_dollars. * cpplex.c (forms_identifier_p): Use warn_dollars. * config/darwin.h, config/alpha/vms.h, config/m68hc11/m68hc11.h: Remove redundant definitions of DOLLARS_IN_IDENTIFIERS. * doc/cpp.texi, doc/cppopts.texi, doc/invoke.texi, doc/tm.texi: Update documentation. testsuite: * gcc.dg/dollar.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66911 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/dollar.c')
-rw-r--r--gcc/testsuite/gcc.dg/dollar.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/dollar.c b/gcc/testsuite/gcc.dg/dollar.c
new file mode 100644
index 00000000000..43407f227ed
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/dollar.c
@@ -0,0 +1,9 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc. */
+
+/* { dg-do compile } */
+/* { dg-options -fno-dollars-in-identifiers } */
+
+/* Test that -fno-dollars-in-identifiers is honoured.
+ Neil Booth, 17 May 2003. */
+
+int foobar$; /* { dg-error "stray '\\$'" } */