c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting flexible member array...
authorMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 7 May 2015 08:08:57 +0000 (08:08 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 7 May 2015 08:08:57 +0000 (08:08 +0000)
commite0f0d3b9d210c7962d8186403b87c0b08c19b8ff
treeef62eceb38bcfbb26bb1550dda4f456ae31db72e
parentad2c39af63eecbca99b3b316bb4147d0a0a0fe0a
c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting flexible member array-like members if...

* c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
flexible member array-like members if SANITIZE_BOUNDS_STRICT.

* doc/invoke.texi: Document -fsanitize=bounds-strict.
* flag-types.h (enum sanitize_code): Add SANITIZE_BOUNDS_STRICT, or it
into SANITIZE_NONDEFAULT.
* opts.c (common_handle_option): Handle -fsanitize=bounds-strict.

* c-c++-common/ubsan/bounds-10.c: New test.

From-SVN: r222871
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-ubsan.c
gcc/doc/invoke.texi
gcc/flag-types.h
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/bounds-10.c [new file with mode: 0644]