* decl.c (grokdeclarator): Check whether "long" or "short" was
specified for non-integral types.
* g++.dg/parse/long1.C: Add more tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115843
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/6634
+ * decl.c (grokdeclarator): Check whether "long" or "short" was
+ specified for non-integral types.
+
2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
error ("%<long%> invalid for %qs", name);
else if (short_p && TREE_CODE (type) == REAL_TYPE)
error ("%<short%> invalid for %qs", name);
+ else if ((long_p || short_p) && TREE_CODE (type) != INTEGER_TYPE)
+ error ("%<long%> or %<short%> invalid for %qs", name);
else if ((long_p || short_p) && explicit_char)
error ("%<long%> or %<short%> specified with char for %qs", name);
else if (long_p && short_p)
+2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/6634
+ * g++.dg/parse/long1.C: Add more tests.
+
2006-07-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* gfortran.dg/lrshift_1.c: New file.
long long double x; // { dg-error "long long" }
long double y;
long float z; // { dg-error "long" }
+
+typedef short void SV; // { dg-error "short" }
+typedef long struct A LA; // { dg-error "long" }
+typedef short char SC; // { dg-error "short" }