diff options
author | Martin Sebor <msebor@redhat.com> | 2018-01-18 16:26:14 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2018-01-18 09:26:14 -0700 |
commit | 8ca07d928cedce021d7ebbe1f5e0f71e92193a5c (patch) | |
tree | 28096b1b975864b5369a7ae8a7780b03a4c694a5 /gcc | |
parent | 00850e40bee8c0614a8220069eb23f74feebd0f1 (diff) | |
download | gcc-8ca07d928cedce021d7ebbe1f5e0f71e92193a5c.zip gcc-8ca07d928cedce021d7ebbe1f5e0f71e92193a5c.tar.gz gcc-8ca07d928cedce021d7ebbe1f5e0f71e92193a5c.tar.bz2 |
Be clear about virtual table pointer corruptuion rather than the vtable itself.
From-SVN: r256852
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fcbd840..d1679f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-01-18 Martin Sebor <msebor@redhat.com> + + * doc/invoke.texi (-Wclass-memaccess): Tweak text. + 2018-01-18 Jan Hubicka <hubicka@ucw.cz> PR ipa/83619 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8c1d9b3..27c5974 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2970,11 +2970,11 @@ Warn when the destination of a call to a raw memory function such as @code{memset} or @code{memcpy} is an object of class type, and when writing into such an object might bypass the class non-trivial or deleted constructor or copy assignment, violate const-correctness or encapsulation, or corrupt -the virtual table. Modifying the representation of such objects may violate -invariants maintained by member functions of the class. For example, the call -to @code{memset} below is undefined because it modifies a non-trivial class -object and is, therefore, diagnosed. The safe way to either initialize or -clear the storage of objects of such types is by using the appropriate +virtual table pointers. Modifying the representation of such objects may +violate invariants maintained by member functions of the class. For example, +the call to @code{memset} below is undefined because it modifies a non-trivial +class object and is, therefore, diagnosed. The safe way to either initialize +or clear the storage of objects of such types is by using the appropriate constructor or assignment operator, if one is available. @smallexample std::string str = "abc"; |