From 313db8e6d1e62f372d168b7368f220cb432d07d6 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Thu, 25 Jun 2009 11:50:47 -0400 Subject: Disallow embedded C in tapset functions ifor unprivileged users unless tagged by /* unprivileged */. --- tapsets.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 3017e203..0a07e7a8 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2662,6 +2662,9 @@ void dwarf_cast_expanding_visitor::filter_special_modules(string& module) void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) { + if (s.unprivileged) + throw semantic_error("typecasting may not be used when --unprivileged is specified", e->tok); + bool lvalue = is_active_lvalue(e); if (lvalue && !s.guru_mode) throw semantic_error("write to typecast value not permitted", e->tok); -- cgit