diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 19:22:40 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 19:22:40 +0000 |
commit | e18a8ca20bda043a85e95113e7288b4170023785 (patch) | |
tree | 5903f739377a9d23396281e6491570f3103529de /gcc/cp/parser.c | |
parent | dabe786b59ca225bc2389fbfa5616e5ddd85d2fa (diff) | |
download | gcc-e18a8ca20bda043a85e95113e7288b4170023785.tar.gz |
2012-10-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 191993 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@191994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index e8c037885ef..155b51a180d 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -5749,7 +5749,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, || TREE_CODE (postfix_expression) == MEMBER_REF || TREE_CODE (postfix_expression) == DOTSTAR_EXPR) postfix_expression = (build_offset_ref_call_from_tree - (postfix_expression, &args)); + (postfix_expression, &args, + tf_warning_or_error)); else if (idk == CP_ID_KIND_QUALIFIED) /* A call to a static class member, or a namespace-scope function. */ @@ -12479,9 +12480,11 @@ cp_parser_template_id (cp_parser *parser, return error_mark_node; } /* Otherwise, emit an error about the invalid digraph, but continue - parsing because we got our argument list. */ - if (permerror (next_token->location, - "%<<::%> cannot begin a template-argument list")) + parsing because we got our argument list. In C++11 do not emit + any error, per 2.5/3. */ + if (cxx_dialect < cxx0x + && permerror (next_token->location, + "%<<::%> cannot begin a template-argument list")) { static bool hint = false; inform (next_token->location, @@ -12489,8 +12492,9 @@ cp_parser_template_id (cp_parser *parser, " Insert whitespace between %<<%> and %<::%>"); if (!hint && !flag_permissive) { - inform (next_token->location, "(if you use %<-fpermissive%>" - " G++ will accept your code)"); + inform (next_token->location, "(if you use %<-fpermissive%> " + "or %<-std=c++11%>, or %<-std=gnu++11%> G++ will " + "accept your code)"); hint = true; } } |