Skip to content

Commit e3de3f6

Browse files
committed
Re-enable access control checks
1 parent df85911 commit e3de3f6

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/cpp/cpp_typecheck_compound_type.cpp

+5-9
Original file line numberDiff line numberDiff line change
@@ -1487,13 +1487,11 @@ bool cpp_typecheckt::get_component(
14871487
}
14881488
else
14891489
{
1490-
#if 0
14911490
error().source_location=source_location;
1492-
str << "error: member `" << component_name
1493-
<< "' is not accessible (" << component.get(ID_access) << ")";
1494-
str << "\nstruct name: " << final_type.get(ID_name);
1491+
error() << "error: member `" << component_name
1492+
<< "' is not accessible (" << component.get(ID_access) << ")"
1493+
<< eom;
14951494
throw 0;
1496-
#endif
14971495
}
14981496
}
14991497

@@ -1523,12 +1521,10 @@ bool cpp_typecheckt::get_component(
15231521
{
15241522
if(check_component_access(component, final_type))
15251523
{
1526-
#if 0
15271524
error().source_location=source_location;
1528-
str << "error: member `" << component_name
1529-
<< "' is not accessible";
1525+
error() << "error: member `" << component_name
1526+
<< "' is not accessible" << eom;
15301527
throw 0;
1531-
#endif
15321528
}
15331529

15341530
if(object.get_bool(ID_C_lvalue))

0 commit comments

Comments
 (0)