re PR c++/28292 (ICE in acceptable_java_type)
PR c++/28292 * decl2.c (acceptable_java_type): Robustify. Use proper Boolean return type instead of return 1. (check_java_method): Don't issue error about type not being an acceptable Java parameter if it's error_mark_node. * g++.dg/other/error12.C: New test. From-SVN: r115474
This commit is contained in:
parent
e3beea684a
commit
662c2e83b1
|
@ -1,3 +1,12 @@
|
|||
2006-07-15 Lee Millward <lee.millward@gmail.com>
|
||||
|
||||
PR c++/28292
|
||||
* decl2.c (acceptable_java_type): Robustify. Use
|
||||
proper Boolean return type instead of return 1.
|
||||
(check_java_method): Don't issue error about
|
||||
type not being an acceptable Java parameter if
|
||||
it's error_mark_node.
|
||||
|
||||
2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/28249
|
||||
|
|
|
@ -469,8 +469,11 @@ check_member_template (tree tmpl)
|
|||
static bool
|
||||
acceptable_java_type (tree type)
|
||||
{
|
||||
if (type == error_mark_node)
|
||||
return false;
|
||||
|
||||
if (TREE_CODE (type) == VOID_TYPE || TYPE_FOR_JAVA (type))
|
||||
return 1;
|
||||
return true;
|
||||
if (TREE_CODE (type) == POINTER_TYPE || TREE_CODE (type) == REFERENCE_TYPE)
|
||||
{
|
||||
type = TREE_TYPE (type);
|
||||
|
@ -526,8 +529,9 @@ check_java_method (tree method)
|
|||
tree type = TREE_VALUE (arg_types);
|
||||
if (!acceptable_java_type (type))
|
||||
{
|
||||
error ("Java method %qD has non-Java parameter type %qT",
|
||||
method, type);
|
||||
if (type != error_mark_node)
|
||||
error ("Java method %qD has non-Java parameter type %qT",
|
||||
method, type);
|
||||
jerr = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2006-07-15 Lee Millward <lee.millward@gmail.com>
|
||||
|
||||
PR c++/28292
|
||||
* g++.dg/other/error12.C: New test.
|
||||
|
||||
2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/28249
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
//PR c++/28292
|
||||
|
||||
extern "Java"
|
||||
{
|
||||
struct A
|
||||
{
|
||||
void foo(void; // { dg-error "before|incomplete type|invalid use" }
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue