Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37711773
en ru br
Репозитории ALT

Группа :: Разработка/C
Пакет: gcc10

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: alt-defaults-format-security.patch
Скачать


--- gcc/gcc/c-family/c.opt
+++ gcc/gcc/c-family/c.opt
@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O
 Warn about format strings that are not literals.
 
 Wformat-security
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
 Warn about possible security problems with format functions.
 
 Wformat-signedness
@@ -571,7 +571,7 @@
 Warn about zero-length formats.
 
 Wformat=
-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
 Warn about printf/scanf/strftime/strfmon format string anomalies.
 
 Wformat-overflow=
--- gcc/gcc/doc/invoke.texi
+++ gcc/gcc/doc/invoke.texi
@@ -3739,6 +3739,9 @@ options: @option{-Wno-format-contains-nul},
 @option{-Wno-format-extra-args}, and @option{-Wno-format-zero-length}.
 @option{-Wformat} is enabled by @option{-Wall}.
 
+NOTE: In ALT Linux gcc 4.4.0-alt1 and later versions this option is enabled
+by default for C, C++, ObjC, ObjC++.  To disable, use @option{-Wformat=0}.
+
 @item -Wno-format-contains-nul
 @opindex Wno-format-contains-nul
 @opindex Wformat-contains-nul
@@ -3793,6 +3796,12 @@ currently a subset of what @option{-Wformat-nonliteral} warns about, but
 in future warnings may be added to @option{-Wformat-security} that are not
 included in @option{-Wformat-nonliteral}.)
 
+NOTE: In ALT Linux gcc 4.4.0-alt1 and later versions this option is enabled
+by default for C, C++, ObjC, ObjC++.
+To disable, use @option{-Wno-format-security}.
+To make format security warnings fatal, specify
+@option{-Werror=format-security}.
+
 @item -Wformat-signedness
 @opindex Wformat-signedness
 @opindex Wno-format-signedness
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin