diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2006-06-04 23:42:04 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2006-06-04 23:42:04 +0000 |
commit | 545b7d8c3565d0ecee088a7d72fd7ae8f58ab7eb (patch) | |
tree | 2bddd61210982f6d3a1adbfa0506167eda2b2d24 /gcc/c-common.c | |
parent | 0ac11108c422b8daeb62e22c5f04beeb299055dc (diff) | |
download | gcc-545b7d8c3565d0ecee088a7d72fd7ae8f58ab7eb.zip gcc-545b7d8c3565d0ecee088a7d72fd7ae8f58ab7eb.tar.gz gcc-545b7d8c3565d0ecee088a7d72fd7ae8f58ab7eb.tar.bz2 |
re PR c++/27601 (ICE (in fold_offsetof_1, at c-common.c:5998) on strange offsetof)
PR c++/27601
* c-common.c (fold_offsetof_1): Handle static members.
* g++.dg/ext/offsetof1.C: New test.
From-SVN: r114369
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index dea8389..1fb5a6a 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -5981,6 +5981,10 @@ fold_offsetof_1 (tree expr) case ERROR_MARK: return expr; + case VAR_DECL: + error ("cannot apply %<offsetof%> to static data member %qD", expr); + return error_mark_node; + case INDIRECT_REF: return size_zero_node; |