public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: <sword_iii@sina.com>
To: "newlib" <newlib@sourceware.org>
Subject: Why the cplusplus doesn't support -D_FORTIFY_SOURCE
Date: Mon, 24 Aug 2020 14:53:44 +0800	[thread overview]
Message-ID: <20200824065344.3021D464046E@webmail.sinamail.sina.com.cn> (raw)

In the sys/features.h, the "__SSP_FORTIFY_LEVEL" will not be defined when thesource file is cpluspluse.#if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \   (__OPTIMIZE__ > 0 || defined(__clang__)) && __GNUC_PREREQ__(4, 1)#  if _FORTIFY_SOURCE > 1#    define __SSP_FORTIFY_LEVEL 2#  else#    define __SSP_FORTIFY_LEVEL 1#  endif#else#  define __SSP_FORTIFY_LEVEL 0#endifSo, if defined cplusplus, the __SPP_FORTIFY_LEVEL is always 0.My question is why disable this feature,  if enable this feature forcely, is there any possible issue?Br,Yingchun

             reply	other threads:[~2020-08-24  6:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  6:53 sword_iii [this message]
2020-08-24  7:14 Yingchun Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200824065344.3021D464046E@webmail.sinamail.sina.com.cn \
    --to=sword_iii@sina.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).