diff options
author | Tom Tromey <tromey@redhat.com> | 2011-01-05 14:51:20 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2011-01-05 14:51:20 +0000 |
commit | 7bd111573699079b760f18e81439cd7dc5268cca (patch) | |
tree | c6fc2880160c7b40280f2a22134ddb900dd3730f /gcc/c-parser.c | |
parent | cd656e236051edd0e84bbadea2d8bd174d604d08 (diff) | |
download | gcc-7bd111573699079b760f18e81439cd7dc5268cca.zip gcc-7bd111573699079b760f18e81439cd7dc5268cca.tar.gz gcc-7bd111573699079b760f18e81439cd7dc5268cca.tar.bz2 |
c-parser.c (c_parser_omp_atomic): Pass location of assignment operator to c_finish_omp_atomic.
gcc
* c-parser.c (c_parser_omp_atomic): Pass location of assignment
operator to c_finish_omp_atomic.
* c-typeck.c (lvalue_or_else): Add 'loc' argument.
(build_unary_op): Update.
(build_modify_expr): Update.
(build_asm_expr): Update.
gcc/cp
* typeck.c (cp_build_addr_expr_1): Update call to lvalue_error.
(lvalue_or_else): Likewise.
gcc/c-family
* c-common.h (lvalue_error): Update.
* c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
not error.
From-SVN: r168514
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 4eaf868..1e868af 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -1,6 +1,6 @@ /* Parser for C and Objective-C. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Parser actions based on the old Bison parser; structure somewhat @@ -9104,6 +9104,9 @@ c_parser_omp_atomic (location_t loc, c_parser *parser) goto saw_error; } + /* Arrange to pass the location of the assignment operator to + c_finish_omp_atomic. */ + loc = c_parser_peek_token (parser)->location; c_parser_consume_token (parser); { location_t rhs_loc = c_parser_peek_token (parser)->location; |