zsh-workers
 help / color / mirror / code / Atom feed
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] _gcc: fix a trivial bug, and update a few options
Date: Wed, 11 Jul 2018 18:26:14 +0900	[thread overview]
Message-ID: <EADBF454-A058-48DC-BAF4-C9BEDE94A516@kba.biglobe.ne.jp> (raw)

'gcc -m<TAB>' doesn't work; this is a trivial bug (see the 2nd hunk).

Add description to options -C, -P, -H.
Add option -CC.
Remove option -a (and -s, which was duplicated)

Does the option '-a' exist in any versions of gcc?


diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc
index 5fcd020bd..5b97b8c30 100644
--- a/Completion/Unix/Command/_gcc
+++ b/Completion/Unix/Command/_gcc
@@ -339,8 +339,7 @@ h8/300)
 esac
 
 if [[ "$service" = clang* ]]; then
-    args=(
-        $args
+    args+=(
         "-flto=-[generate output files suitable for link time optimization]::style:(full thin)"
         -emit-llvm
         "-Qunused-arguments[don't emit warning for unused driver arguments]"
@@ -353,7 +352,7 @@ if [[ "$service" = clang* ]]; then
         "-nobuiltininc[Do not search builtin directory for include files]"
     )
 else
-    args=(
+    args+=(
       '-flto=-[Enable link-time optimization]::jobs:'
     )
 fi
@@ -383,7 +382,6 @@ languages=(
 
 # generic options (from --help)
 args+=(
-  -a -C -H -P -s
   '-###[print commands to run this compilation]'
   '-o:output file:_files -g "^*.(c|h|cc|C|cxx)(-.)"'
   '-x[Specify the language of the following input files]:input file language:('"$languages"')'
@@ -395,6 +393,10 @@ args+=(
   '*-A-:define assertion:'
   '*-D-:define macro:'
   '*-U-:undefine macro:'
+  '-C[do not discard comments during preprocess]'
+  '-CC[do not discard comments, including macro expansion]'
+  '-P[inhibit generation of linkemakers during preprocess]'
+  '-H[print name of each header file used]'
   '-E[Preprocess only; do not compile, assemble or link]'
   '-S[Compile only; do not assemble or link]'
   '-c[Compile and assemble, but do not link]'






             reply	other threads:[~2018-07-11 10:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  9:26 Jun T [this message]
2018-07-11 16:31 ` dana

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=EADBF454-A058-48DC-BAF4-C9BEDE94A516@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).