diff options
author | burley <burley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-29 12:13:17 +0000 |
---|---|---|
committer | burley <burley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-03-29 12:13:17 +0000 |
commit | 54921d09da25bc92cd0e6800e7c88c7bfa48026c (patch) | |
tree | d6da6841ca39e2e1022c6fd71fdc3ace7c10b387 /gcc/invoke.texi | |
parent | 092aa66ff178f8b757973c164357a255af5b1a18 (diff) | |
download | ppe42-gcc-54921d09da25bc92cd0e6800e7c88c7bfa48026c.tar.gz ppe42-gcc-54921d09da25bc92cd0e6800e7c88c7bfa48026c.zip |
Clarify -fcheck-memory-usage
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/invoke.texi')
-rw-r--r-- | gcc/invoke.texi | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/invoke.texi b/gcc/invoke.texi index ad145dab442..b07b5a3f330 100644 --- a/gcc/invoke.texi +++ b/gcc/invoke.texi @@ -6060,17 +6060,22 @@ Generate extra code to check each memory access. GNU CC will generate code that is suitable for a detector of bad memory accesses such as @file{Checker}. -You must also specify this option when you compile functions you call that -have side effects. If you do not, you may get erroneous messages from -the detector. Normally, you should compile all your code with this option. +Normally, you should compile all, or none, of your code with this option. + +If you do mix code compiled with and without this option, +you must ensure that all code that has side effects +and that is called by code compiled with this option +is, itself, compiled with this option. +If you do not, you might get erroneous messages from the detector. + If you use functions from a library that have side-effects (such as -@code{read}), you may not be able to recompile the library and +@code{read}), you might not be able to recompile the library and specify this option. In that case, you can enable the @samp{-fprefix-function-name} option, which requests GNU CC to encapsulate your code and make other functions look as if they were compiled with @samp{-fcheck-memory-usage}. This is done by calling ``stubs'', which are provided by the detector. If you cannot find or build -stubs for every function you call, you may have to specify +stubs for every function you call, you might have to specify @samp{-fcheck-memory-usage} without @samp{-fprefix-function-name}. If you specify this option, you can not use the @code{asm} or @@ -6095,7 +6100,7 @@ These calls would be similar to those done in the stubs described above. Request GNU CC to add a prefix to the symbols generated for function names. GNU CC adds a prefix to the names of functions defined as well as functions called. Code compiled with this option and code compiled -without the option can't be linked together, unless or stubs are used. +without the option can't be linked together, unless stubs are used. If you compile the following code with @samp{-fprefix-function-name} @example @@ -6104,7 +6109,6 @@ void foo (int a) @{ return bar (a + 5); - @} @end example |