Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: allow multiple completion for gcc -Wsuggest-attribute



gcc allows the -Wsuggest-attribute option to be repeated because it can
be used with each of the four possible values.

Oliver

diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc
index 8687adc6e..1052967c7 100644
--- a/Completion/Unix/Command/_gcc
+++ b/Completion/Unix/Command/_gcc
@@ -628,7 +628,7 @@ args+=(
   '-Wstrict-selector-match[Warn if type signatures of candidate methods do not match exactly]'
   '-Wstringop-overflow[Warn about buffer overflow in string manipulation functions like memcpy and strcpy.  Same as  -Wstringop-overflow=]'
   '-Wsubobject-linkage[Warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage]'
-  '-Wsuggest-attribute=-[Warn about functions which might be candidates for __attribute__((const))]:const:(pure const noreturn format)'
+  '*-Wsuggest-attribute=-[warn about functions which might be candidates for __attribute__((const))]:const:(pure const noreturn format)'
   '-Wsuggest-final-methods[Warn about C++ virtual methods where adding final keyword would improve code quality]'
   '-Wsuggest-final-types[Warn about C++ polymorphic types where adding final keyword would improve code quality]'
   '-Wsuggest-override[Suggest that the override keyword be used when the declaration of a virtual function overrides another]'



Messages sorted by: Reverse Date, Date, Thread, Author