This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Implement Undefined Behavior Sanitizer (take 2)
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Jun 2013 15:48:24 +0200
- Subject: Re: [RFC] Implement Undefined Behavior Sanitizer (take 2)
- References: <alpine dot DEB dot 2 dot 10 dot 1306081915200 dot 3960 at laptop-mg dot saclay dot inria dot fr> <20130608182233 dot GL1493 at tucnak dot redhat dot com> <20130611184430 dot GO4160 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1306112103390 dot 28144 at stedding dot saclay dot inria dot fr> <20130611194439 dot GP4160 at redhat dot com> <20130611200900 dot GK2336 at tucnak dot redhat dot com> <20130611202024 dot GR4160 at redhat dot com> <20130611203325 dot GL2336 at tucnak dot redhat dot com> <20130611204012 dot GS4160 at redhat dot com> <20130611204412 dot GM2336 at tucnak dot redhat dot com>
On Tue, Jun 11, 2013 at 10:44:12PM +0200, Jakub Jelinek wrote:
> There is another thing to solve BTW, op0 and/or op1 might have side-effects,
> if you are going to evaluate them more than once, they need to be surrounded
> into cp_save_expr resp. c_save_expr.
There's that unpleasant thing that cp_save_expr is declared in
cp/cp-tree.h, but we don't want to include cp/*.h or c/*.h files
in c-family/c-ubsan.c. Should I use save_expr from tree.c instead?
I seem to recall that that isn't the best thing to do...
Marek