typeck.c (build_class_member_access_expr): Move -Winvalid-offsetof code...
authorJason Merrill <jason@redhat.com>
Tue, 9 Sep 2014 12:49:23 +0000 (08:49 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 9 Sep 2014 12:49:23 +0000 (08:49 -0400)
commit8591575ff8d7959e829fd13eb171aefe2a60bc19
treeeec8d8211d7808205af1ac2ac89e273765de0a03
parent97f518b3fe714bb026f8070aa475e86ddbcca509
typeck.c (build_class_member_access_expr): Move -Winvalid-offsetof code...

* typeck.c (build_class_member_access_expr): Move
-Winvalid-offsetof code...
* semantics.c (finish_offsetof): ...here.
* parser.c (cp_parser_builtin_offsetof): Remember the location of
the type argument.
* pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.

From-SVN: r215070
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/testsuite/g++.dg/abi/offsetof.C
gcc/testsuite/g++.dg/other/offsetof3.C
gcc/testsuite/g++.dg/other/offsetof5.C