This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fstack-protector docs


James E Wilson wrote:
The fact that __SSP_ALL__ is set to 2 looks suspiciously like a bug.  I
suspect that originally there was one macro that was set to either 1 or
2, and then Richard decided to make it two macros, but forgot to change
the value of the new macro to 1.  So maybe I should be fixing this value
rather than documenting it.

I got an answer from Richard in private mail, explaining that this was done for compatibility with the IBM ProPolice implementation. So I've added a comment to explain this and checked it in. This was tested with a simple make all-gcc just to verify that I didn't add a typo.


I've also checked in my doc patch. I forgot to mention this earlier, but it was tested with a make doc and make dvi, plus viewing the info and dvi files to make sure the new text looked OK.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com
2005-08-13  James E Wilson  <wilson@specifix.com>

	* c-cppbuiltin.c (c_cpp_builtins): Add comment for flag_stack_protect
	macros.

Index: c-cppbuiltin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-cppbuiltin.c,v
retrieving revision 1.32
diff -p -p -r1.32 c-cppbuiltin.c
*** c-cppbuiltin.c	27 Jun 2005 07:40:56 -0000	1.32
--- c-cppbuiltin.c	13 Aug 2005 20:54:16 -0000
*************** c_cpp_builtins (cpp_reader *pfile)
*** 440,446 ****
    if (targetm.handle_pragma_extern_prefix)
      cpp_define (pfile, "__PRAGMA_EXTERN_PREFIX");
  
!   /* Make the choice of the stack protector runtime visible to source code.  */
    if (flag_stack_protect == 2)
      cpp_define (pfile, "__SSP_ALL__=2");
    else if (flag_stack_protect == 1)
--- 440,448 ----
    if (targetm.handle_pragma_extern_prefix)
      cpp_define (pfile, "__PRAGMA_EXTERN_PREFIX");
  
!   /* Make the choice of the stack protector runtime visible to source code.
!      The macro names and values here were chosen for compatibility with an
!      earlier implementation, i.e. ProPolice.  */
    if (flag_stack_protect == 2)
      cpp_define (pfile, "__SSP_ALL__=2");
    else if (flag_stack_protect == 1)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]