aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2007-04-22 20:14:14 +1000
committerGravatar axel <axel@liljencrantz.se>2007-04-22 20:14:14 +1000
commit176c1a487b89d4450be47f921034571233ab1740 (patch)
tree1d6d62c46e70578ac31f7a2bf1d148e43e9babaa
parent2872df66d70556b9f655c4a33ee3538674f554df (diff)
Minor improvements to the completion generator and gcc completions
darcs-hash:20070422101414-ac50b-07612cd287d524a361e358369732c26fc9ff3b67.gz
-rwxr-xr-xmake_completions.py26
-rw-r--r--share/completions/gcc.fish90
2 files changed, 66 insertions, 50 deletions
diff --git a/make_completions.py b/make_completions.py
index ec20470f..cee4698a 100755
--- a/make_completions.py
+++ b/make_completions.py
@@ -10,7 +10,7 @@ def escape_quotes(s):
def escape(s):
return re.sub('([\'"#%*?])', r"\\\1", s)
-def print_completion( cmd, switch_name, desc ):
+def print_completion( cmd, switch_name, arg, desc ):
offset=1
switch_type = "o"
@@ -22,7 +22,15 @@ def print_completion( cmd, switch_name, desc ):
switch_type = "l"
offset=2
- print "complete -c %s -%s %s --description '%s'" % (cmd, switch_type, escape( switch_name[offset:] ), escape_quotes(desc))
+ arg_str = ""
+ if arg == None:
+ pass
+ elif arg == "standard":
+ arg_str = "-a 'c89 c99 gnu89 gnu99 c++98 gnu++98'"
+ else:
+ pass
+
+ print "complete -c %s -%s %s %s --description '%s'" % (cmd, switch_type, escape( switch_name[offset:] ), arg_str, escape_quotes(desc))
def clean_whitespace( str ):
clean_whitespace_prog0 = re.compile( r"-[ \t]*\n[ \t\r]+" )
@@ -45,6 +53,9 @@ prog1 = re.compile(re1, re.MULTILINE)
re2 = r"^(|=[^ ]*)( |\n)*(?P<switch>-[^ =./\n]+)( *[^-\n ]*\n|)"
prog2 = re.compile(re2, re.MULTILINE)
+re3 = r"^=(?P<arg>[^ ]*)"
+prog3 = re.compile(re2, 0)
+
while True:
match = prog1.search( remainder )
@@ -74,14 +85,21 @@ while True:
rem2 = rem2[match2.end():]
+ match_arg = prog3.search( rem2 )
+ arg = None
+
+ if match_arg != None:
+ arg = match_arg.expand( r"\g<arg>" )
+ rem2 = rem2[match_arg.end():]
+
desc = clean_whitespace(rem2)
- if len( desc) > 8:
+ if len( desc) > 8 and arg != None:
# print "Yay desc '%s'!!\n" % desc
for i in switch:
- print_completion( cmd, i, desc )
+ print_completion( cmd, i, arg, desc )
remainder = remainder[match.end():]
diff --git a/share/completions/gcc.fish b/share/completions/gcc.fish
index 3f573a63..ba37d281 100644
--- a/share/completions/gcc.fish
+++ b/share/completions/gcc.fish
@@ -28,6 +28,7 @@ end;
complete -c gcc -s o --description 'Place output in file' -r
complete -c gcc -o aux-info --description 'Output to the given filename prototyped declarations for all functions declared and/or defined in a translation unit, including those in header files' -r
complete -c gcc -o fabi-version --description 'Use specified version of the C++ ABI' -xa "0 1"
+complete -c gcc -l sysroot -x -a '(__fish_complete_directories)' --description 'Use dir as the logical root directory for headers and libraries'
#
@@ -122,9 +123,8 @@ complete -c gcc -o Wselector --description 'Warn if multiple methods of differen
complete -c gcc -o Wstrict-selector-match --description 'Warn if multiple methods with differing argument and/or return types are found for a given selector when attempting to send a message using this selector to a receiver of type "id" or "Class"'
complete -c gcc -o Wundeclared-selector --description 'Warn if a "@selector('
complete -c gcc -o print-objc-runtime-info --description 'Generate C header describing the largest structure that is passed by value, if any'
-complete -c gcc -o fmessage-length --description '=n Try to format error messages so that they fit on lines of about n characters'
-complete -c gcc -o fdiagnostics-show-location --description '=once Only meaningful in line-wrapping mode'
-complete -c gcc -o fdiagnostics-show-location --description 'Only meaningful in line-wrapping mode'
+complete -c gcc -o fmessage-length --description 'Try to format error messages so that they fit on lines of the specified number of characters' -x -a "80"
+complete -c gcc -o fdiagnostics-show-location --description 'Only meaningful in line-wrapping mode' -a "once"
complete -c gcc -o line --description 'Only meaningful in line-wrapping mode'
complete -c gcc -o fdiagnostics-show-options --description 'This option instructs the diagnostic machinery to add text to each diagnostic emitted, which indicates which command line option directly controls that diagnostic, when such an option is known to the diagnostic machinery'
complete -c gcc -o Wno- --description 'to turn off warnings; for example, -Wno-implicit'
@@ -142,7 +142,6 @@ complete -c gcc -o Wno-format-extra-args --description 'If -Wformat is specified
complete -c gcc -o Wno-format-zero-length --description 'If -Wformat is specified, do not warn about zero-length formats'
complete -c gcc -o Wformat-nonliteral --description 'If -Wformat is specified, also warn if the format string is not a string literal and so cannot be checked, unless the format function takes its format arguments as a "va_list"'
complete -c gcc -o Wformat-security --description 'If -Wformat is specified, also warn about uses of format functions that represent possible security problems'
-complete -c gcc -o Wformat --description '=2 Enable -Wformat plus format checks not included in -Wformat'
complete -c gcc -o Wnonnull --description 'Warn about passing a null pointer for arguments marked as requiring a non-null value by the "nonnull" function attribute'
complete -c gcc -o Winit-self --description '(C, C++, Objective-C and Objective-C++ only) Warn about uninitialized variables which are initialized with themselves'
complete -c gcc -o Wimplicit-int --description 'Warn when a declaration does not specify a type'
@@ -168,8 +167,7 @@ complete -c gcc -o Wunused --description 'All the above -Wunused options combine
complete -c gcc -o Wuninitialized --description 'Warn if an automatic variable is used without first being initialized or if a variable may be clobbered by a "setjmp" call'
complete -c gcc -o Wunknown-pragmas --description 'Warn when a #pragma directive is encountered which is not understood by GCC'
complete -c gcc -o Wno-pragmas --description 'Do not warn about misuses of pragmas, such as incorrect parameters, invalid syntax, or conflicts between pragmas'
-complete -c gcc -o Wstrict-aliasing --description 'This option is only active when -fstrict-aliasing is active'
-complete -c gcc -o Wstrict-aliasing --description '=2 This option is only active when -fstrict-aliasing is active'
+complete -c gcc -o Wstrict-aliasing --description 'This option is only active when -fstrict-aliasing is active' -a "2"
complete -c gcc -o Wall --description 'All of the above -W options combined'
complete -c gcc -o Wextra --description '(This option used to be called -W'
complete -c gcc -o Wno-div-by-zero --description 'Do not warn about compile-time integer division by zero'
@@ -200,7 +198,7 @@ complete -c gcc -o Wmissing-field-initializers --description 'Warn if a structur
complete -c gcc -o Wmissing-noreturn --description 'Warn about functions which might be candidates for attribute "noreturn"'
complete -c gcc -o Wmissing-format-attribute --description 'Warn about function pointers which might be candidates for "format" attributes'
complete -c gcc -o Wno-multichar --description 'Do not warn if a multicharacter constant (’FOOF’) is used'
-complete -c gcc -o Wnormalized --description '=<none│id│nfc│nfkc> In ISO C and ISO C++, two identifiers are different if they are different sequences of characters'
+complete -c gcc -o Wnormalized --description 'In ISO C and ISO C++, two identifiers are different if they are different sequences of characters' -x -a "none id nfc nfkc"
complete -c gcc -o Wno-deprecated-declarations --description 'Do not warn about uses of functions, variables, and types marked as deprecated by using the "deprecated" attribute'
complete -c gcc -o Wpacked --description 'Warn if a structure is given the packed attribute, but the packed attribute has no effect on the layout or size of the structure'
complete -c gcc -o Wpadded --description 'Warn if padding is included in a structure, either to align an element of the structure or to align the whole structure'
@@ -254,16 +252,16 @@ complete -c gcc -o fdump-class-hierarchy-options --description '(C++ only) Dump
complete -c gcc -o fdump-ipa-switch --description 'Control the dumping at various stages of inter-procedural analysis language tree to a file'
complete -c gcc -o fdump-tree-switch --description 'Control the dumping at various stages of processing the intermediate language tree to a file'
complete -c gcc -o fdump-tree-switch-options --description 'Control the dumping at various stages of processing the intermediate language tree to a file'
-complete -c gcc -o ftree-vectorizer-verbose --description '=n This option controls the amount of debugging output the vectorizer prints'
-complete -c gcc -o frandom-seed --description '=string This option provides a seed that GCC uses when it would otherwise use random numbers'
-complete -c gcc -o fsched-verbose --description '=n On targets that use instruction scheduling, this option controls the amount of debugging output the scheduler prints'
+complete -c gcc -o ftree-vectorizer-verbose --description 'This option controls the amount of debugging output the vectorizer prints' -x -a "1 2 3 4 5"
+complete -c gcc -o frandom-seed --description 'This option provides a seed that GCC uses when it would otherwise use random numbers' -x
+complete -c gcc -o fsched-verbose --description 'On targets that use instruction scheduling, this option controls the amount of debugging output the scheduler prints' -x -a "1 2 3 4 5"
complete -c gcc -o save-temps --description 'Store the usual "temporary" intermediate files permanently; place them in the current directory and name them based on the source file'
complete -c gcc -o time --description 'Report the CPU time taken by each subprocess in the compilation sequence'
complete -c gcc -o fvar-tracking --description 'Run variable tracking pass'
-complete -c gcc -o print-file-name --description '=library Print the full absolute name of the library file library that would be used when linking---and don’t do anything else'
+complete -c gcc -o print-file-name -r --description 'Print the full absolute name of the library file library that would be used when linking---and don’t do anything else'
complete -c gcc -o print-multi-directory --description 'Print the directory name corresponding to the multilib selected by any other switches present in the command line'
complete -c gcc -o print-multi-lib --description 'Print the mapping from multilib directory names to compiler switches that enable them'
-complete -c gcc -o print-prog-name --description '=program Like -print-file-name, but searches for a program such as cpp'
+complete -c gcc -o print-prog-name -r --description 'Like -print-file-name, but searches for a program such as cpp'
complete -c gcc -o print-libgcc-file-name --description 'Same as -print-file-name=libgcc'
complete -c gcc -o print-search-dirs --description 'Print the name of the configured installation directory and a list of program and library directories gcc will search---and don’t do anything else'
complete -c gcc -o dumpmachine --description 'Print the compiler’s target machine (for example, i686-pc-linux-gnu)---and don’t do anything else'
@@ -284,7 +282,7 @@ complete -c gcc -o fno-inline --description 'Don’t pay attention to the "inlin
complete -c gcc -o finline-functions --description 'Integrate all simple functions into their callers'
complete -c gcc -o finline-functions-called-once --description 'Consider all "static" functions called once for inlining into their caller even if they are not marked "inline"'
complete -c gcc -o fearly-inlining --description 'Inline functions marked by "always_inline" and functions whose body seems smaller than the function call overhead early before doing -fprofile-generate instrumentation and real inlining pass'
-complete -c gcc -o finline-limit --description '=n By default, GCC limits the size of functions that can be inlined'
+complete -c gcc -o finline-limit --description 'By default, GCC limits the size of functions that can be inlined' -x -a "1 2 3 4 5"
complete -c gcc -o fkeep-inline-functions --description 'In C, emit "static" functions that are declared "inline" into the object file, even if the function has been inlined into all of its callers'
complete -c gcc -o fkeep-static-consts --description 'Emit variables declared "static const" when optimization isn’t turned on, even if the variables aren’t referenced'
complete -c gcc -o fmerge-constants --description 'Attempt to merge identical constants (string constants and floating point constants) across compilation units'
@@ -325,8 +323,8 @@ complete -c gcc -o fno-sched-interblock --description 'Don’t schedule instruct
complete -c gcc -o fno-sched-spec --description 'Don’t allow speculative motion of non-load instructions'
complete -c gcc -o fsched-spec-load --description 'Allow speculative motion of some load instructions'
complete -c gcc -o fsched-spec-load-dangerous --description 'Allow speculative motion of more load instructions'
-complete -c gcc -o fsched-stalled-insns --description '=n Define how many insns (if any) can be moved prematurely from the queue of stalled insns into the ready list, during the second scheduling pass'
-complete -c gcc -o fsched-stalled-insns-dep --description '=n Define how many insn groups (cycles) will be examined for a dependency on a stalled insn that is candidate for premature removal from the queue of stalled insns'
+complete -c gcc -o fsched-stalled-insns --description 'Define how many insns (if any) can be moved prematurely from the queue of stalled insns into the ready list, during the second scheduling pass'
+complete -c gcc -o fsched-stalled-insns-dep --description 'Define how many insn groups (cycles) will be examined for a dependency on a stalled insn that is candidate for premature removal from the queue of stalled insns'
complete -c gcc -o fsched2-use-superblocks --description 'When scheduling after register allocation, do use superblock scheduling algorithm'
complete -c gcc -o fsched2-use-traces --description 'Use -fsched2-use-superblocks algorithm when scheduling after register allocation and additionally perform code duplication in order to increase the size of superblocks using tracer pass'
complete -c gcc -o freschedule-modulo-scheduled-loops --description 'The modulo scheduling comes before the traditional scheduling, if a loop was modulo scheduled we may want to prevent the later scheduling passes from changing its schedule, we use this option to control that'
@@ -367,14 +365,14 @@ complete -c gcc -o freorder-blocks --description 'Reorder basic blocks in the co
complete -c gcc -o freorder-blocks-and-partition --description 'In addition to reordering basic blocks in the compiled function, in order to reduce number of taken branches, partitions hot and cold basic blocks into separate sections of the assembly and '
complete -c gcc -o freorder-functions --description 'Reorder functions in the object file in order to improve code locality'
complete -c gcc -o fstrict-aliasing --description 'Allows the compiler to assume the strictest aliasing rules applicable to the language being compiled'
-complete -c gcc -o falign-functions --description '=n Align the start of functions to the next power-of-two greater than n, skipping up to n bytes'
-complete -c gcc -o falign-functions --description '=n Align the start of functions to the next power-of-two greater than n, skipping up to n bytes'
-complete -c gcc -o falign-labels --description '=n Align all branch targets to a power-of-two boundary, skipping up to n bytes like -falign-functions'
-complete -c gcc -o falign-labels --description '=n Align all branch targets to a power-of-two boundary, skipping up to n bytes like -falign-functions'
-complete -c gcc -o falign-loops --description '=n Align loops to a power-of-two boundary, skipping up to n bytes like -falign-functions'
-complete -c gcc -o falign-loops --description '=n Align loops to a power-of-two boundary, skipping up to n bytes like -falign-functions'
-complete -c gcc -o falign-jumps --description '=n Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping, skipping up to n bytes like -falign-functions'
-complete -c gcc -o falign-jumps --description '=n Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping, skipping up to n bytes like -falign-functions'
+complete -c gcc -o falign-functions --description 'Align the start of functions to the next power-of-two greater than n, skipping up to n bytes'
+complete -c gcc -o falign-functions --description 'Align the start of functions to the next power-of-two greater than n, skipping up to n bytes'
+complete -c gcc -o falign-labels --description 'Align all branch targets to a power-of-two boundary, skipping up to n bytes like -falign-functions'
+complete -c gcc -o falign-labels --description 'Align all branch targets to a power-of-two boundary, skipping up to n bytes like -falign-functions'
+complete -c gcc -o falign-loops --description 'Align loops to a power-of-two boundary, skipping up to n bytes like -falign-functions'
+complete -c gcc -o falign-loops --description 'Align loops to a power-of-two boundary, skipping up to n bytes like -falign-functions'
+complete -c gcc -o falign-jumps --description 'Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping, skipping up to n bytes like -falign-functions'
+complete -c gcc -o falign-jumps --description 'Align branch targets to a power-of-two boundary, for branch targets where the targets can only be reached by jumping, skipping up to n bytes like -falign-functions'
complete -c gcc -o funit-at-a-time --description 'Parse the whole compilation unit before starting to produce code'
complete -c gcc -o fweb --description 'Constructs webs as commonly used for register allocation purposes and assign each web individual pseudo register'
complete -c gcc -o fwhole-program --description 'Assume that the current compilation unit represents whole program being compiled'
@@ -465,15 +463,15 @@ complete -c gcc -o iquote --description 'Search dir only for header files reques
complete -c gcc -o fdollars-in-identifiers --description '@anchor{fdollars-in-identifiers} Accept $ in identifiers'
complete -c gcc -o fextended-identifiers --description 'Accept universal character names in identifiers'
complete -c gcc -o fpreprocessed --description 'Indicate to the preprocessor that the input file has already been preprocessed'
-complete -c gcc -o ftabstop --description '=width Set the distance between tab stops'
-complete -c gcc -o fexec-charset --description '=charset Set the execution character set, used for string and character constants'
-complete -c gcc -o fwide-exec-charset --description '=charset Set the wide execution character set, used for wide string and character constants'
-complete -c gcc -o finput-charset --description '=charset Set the input character set, used for translation from the character set of the input file to the source character set used by GCC'
+complete -c gcc -o ftabstop --description 'Set the distance between tab stops'
+complete -c gcc -o fexec-charset --description 'Set the execution character set, used for string and character constants' -a "(iconv --list|sed -e 's|//||')"
+complete -c gcc -o fwide-exec-charset --description 'Set the wide execution character set, used for wide string and character constants' -a "(iconv --list|sed -e 's|//||')"
+complete -c gcc -o finput-charset --description 'Set the input character set, used for translation from the character set of the input file to the source character set used by GCC' -a "(iconv --list|sed -e 's|//||')"
complete -c gcc -o fworking-directory --description 'Enable generation of linemarkers in the preprocessor output that will let the compiler know the current working directory at the time of preprocessing'
complete -c gcc -o fno-show-column --description 'Do not print column numbers in diagnostics'
complete -c gcc -s A --description 'Make an assertion with the predicate predicate and answer answer'
-complete -c gcc -s A --description '=answer Cancel an assertion with the predicate predicate and answer answer'
-complete -c gcc -o predicate --description '=answer Cancel an assertion with the predicate predicate and answer answer'
+complete -c gcc -s A --description 'Cancel an assertion with the predicate predicate and answer answer' -x
+complete -c gcc -o predicate --description 'Cancel an assertion with the predicate predicate and answer answer' -x
complete -c gcc -o dCHARS --description 'CHARS is a sequence of one or more of the following characters, and must not be preceded by a space'
complete -c gcc -s P --description 'Inhibit generation of linemarkers in the output from the preprocessor'
complete -c gcc -s C --description 'Do not discard comments'
@@ -511,43 +509,43 @@ complete -c gcc -o Idir --description 'Add the directory dir to the head of the
complete -c gcc -o iquotedir --description 'Add the directory dir to the head of the list of directories to be searched for header files only for the case of #include "file"; they are not searched for #include <file>, otherwise just like -I'
complete -c gcc -o Ldir --description 'Add directory dir to the list of directories to be searched for -l'
complete -c gcc -o Bprefix --description 'This option specifies where to find the executables, libraries, include files, and data files of the compiler itself'
-complete -c gcc -o specs --description '=file Process file after the compiler reads in the standard specs file, in order to override the defaults that the gcc driver program uses when determining what switches to pass to cc1, cc1plus, as, ld, etc'
-complete -c gcc -l sysroot --description '=dir Use dir as the logical root directory for headers and libraries'
+complete -c gcc -o specs -r --description 'Process file after the compiler reads in the standard specs file, in order to override the defaults that the gcc driver program uses when determining what switches to pass to cc1, cc1plus, as, ld, etc'
+complete -c gcc -l sysroot -x -a '(__fish_complete_directories)' --description 'Use dir as the logical root directory for headers and libraries'
complete -c gcc -o I- --description 'This option has been deprecated'
complete -c gcc -s b --description 'The argument machine specifies the target machine for compilation'
complete -c gcc -s V --description 'The argument version specifies which version of GCC to run'
complete -c gcc -o EL --description 'Compile code for little endian mode'
complete -c gcc -o EB --description 'Compile code for big endian mode'
complete -c gcc -o mmangle-cpu --description 'Prepend the name of the cpu to all public symbol names'
-complete -c gcc -o mcpu --description '=cpu Compile code for ARC variant cpu'
+complete -c gcc -o mcpu --description 'Compile code for ARC variant cpu' -x
complete -c gcc -o mtext --description 'Put functions, data, and readonly data in text-section, data-section, and readonly-data-section respectively by default'
complete -c gcc -o mdata --description 'Put functions, data, and readonly data in text-section, data-section, and readonly-data-section respectively by default'
complete -c gcc -o mrodata --description 'Put functions, data, and readonly data in text-section, data-section, and readonly-data-section respectively by default'
complete -c gcc -o section --description 'Put functions, data, and readonly data in text-section, data-section, and readonly-data-section respectively by default'
-complete -c gcc -o mabi --description '=name Generate code for the specified ABI'
+complete -c gcc -o mabi --description 'Generate code for the specified ABI' -x
complete -c gcc -o mapcs-frame --description 'Generate a stack frame that is compliant with the ARM Procedure Call Standard for all functions, even if this is not strictly necessary for correct execution of the code'
complete -c gcc -o mapcs --description 'This is a synonym for -mapcs-frame'
complete -c gcc -o mthumb-interwork --description 'Generate code which supports calling between the ARM and Thumb instruction sets'
complete -c gcc -o mno-sched-prolog --description 'Prevent the reordering of instructions in the function prolog, or the merging of those instruction with the instructions in the function’s body'
complete -c gcc -o mhard-float --description 'Generate output containing floating point instructions'
complete -c gcc -o msoft-float --description 'Generate output containing library calls for floating point'
-complete -c gcc -o mfloat-abi --description '=name Specifies which ABI to use for floating point values'
+complete -c gcc -o mfloat-abi --description 'Specifies which ABI to use for floating point values' -x
complete -c gcc -o mlittle-endian --description 'Generate code for a processor running in little-endian mode'
complete -c gcc -o mbig-endian --description 'Generate code for a processor running in big-endian mode; the default is to compile code for a little-endian processor'
complete -c gcc -o mwords-little-endian --description 'This option only applies when generating code for big-endian processors'
-complete -c gcc -o mcpu --description '=name This specifies the name of the target ARM processor'
-complete -c gcc -o mtune --description '=name This option is very similar to the -mcpu= option, except that instead of specifying the actual target processor type, and hence restricting which instructions can be used, it specifies that GCC should tune the performance of the code as if the target were of the type specified in this option, but still choosing the instructions that it will generate based on the cpu specified by a -mcpu= option'
-complete -c gcc -o march --description '=name This specifies the name of the target ARM architecture'
-complete -c gcc -o mfpu --description '=number This specifies what floating point hardware (or hardware emulation) is available on the target'
-complete -c gcc -o mfpe --description '=number This specifies what floating point hardware (or hardware emulation) is available on the target'
-complete -c gcc -o mfp --description '=number This specifies what floating point hardware (or hardware emulation) is available on the target'
-complete -c gcc -o mstructure-size-boundary --description '=n The size of all structures and unions will be rounded up to a multiple of the number of bits set by this option'
+complete -c gcc -o mcpu --description 'This specifies the name of the target ARM processor' -x
+complete -c gcc -o mtune --description 'This option is very similar to the -mcpu= option, except that instead of specifying the actual target processor type, and hence restricting which instructions can be used, it specifies that GCC should tune the performance of the code as if the target were of the type specified in this option, but still choosing the instructions that it will generate based on the cpu specified by a -mcpu= option' -x
+complete -c gcc -o march --description 'This specifies the name of the target ARM architecture' -x
+complete -c gcc -o mfpu -x --description 'This specifies what floating point hardware (or hardware emulation) is available on the target'
+complete -c gcc -o mfpe -x --description 'This specifies what floating point hardware (or hardware emulation) is available on the target'
+complete -c gcc -o mfp -x --description 'This specifies what floating point hardware (or hardware emulation) is available on the target'
+complete -c gcc -o mstructure-size-boundary -x --description 'The size of all structures and unions will be rounded up to a multiple of the number of bits set by this option'
complete -c gcc -o mabort-on-noreturn --description 'Generate a call to the function "abort" at the end of a "noreturn" function'
complete -c gcc -o mlong-calls --description 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o mno-long-calls --description 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o mnop-fun-dllimport --description 'Disable support for the "dllimport" attribute'
complete -c gcc -o msingle-pic-base --description 'Treat the register used for PIC addressing as read-only, rather than loading it in the prologue for each function'
-complete -c gcc -o mpic-register --description '=reg Specify the register to be used for PIC addressing'
+complete -c gcc -o mpic-register -x --description 'Specify the register to be used for PIC addressing'
complete -c gcc -o mcirrus-fix-invalid-insns --description 'Insert NOPs into the instruction stream to in order to work around problems with invalid Maverick instruction combinations'
complete -c gcc -o mpoke-function-name --description 'Write the name of each function into the text section, directly preceding the function prologue'
complete -c gcc -o mthumb --description 'Generate code for the 16-bit Thumb instruction set'
@@ -555,10 +553,10 @@ complete -c gcc -o mtpcs-frame --description 'Generate a stack frame that is com
complete -c gcc -o mtpcs-leaf-frame --description 'Generate a stack frame that is compliant with the Thumb Procedure Call Standard for all leaf functions'
complete -c gcc -o mcallee-super-interworking --description 'Gives all externally visible functions in the file being compiled an ARM instruction set header which switches to Thumb mode before executing the rest of the function'
complete -c gcc -o mcaller-super-interworking --description 'Allows calls via function pointers (including virtual functions) to execute correctly regardless of whether the target code has been compiled for interworking or not'
-complete -c gcc -o mtp --description '=name Specify the access model for the thread local storage pointer'
-complete -c gcc -o mmcu --description '=mcu Specify ATMEL AVR instruction set or MCU type'
+complete -c gcc -o mtp -x --description 'Specify the access model for the thread local storage pointer'
+complete -c gcc -o mmcu -x --description 'Specify ATMEL AVR instruction set or MCU type'
complete -c gcc -o msize --description 'Output instruction sizes to the asm file'
-complete -c gcc -o minit-stack --description '=N Specify the initial stack address, which may be a symbol or numeric value, __stack is the default'
+complete -c gcc -o minit-stack -x --description 'Specify the initial stack address, which may be a symbol or numeric value, __stack is the default'
complete -c gcc -o mno-interrupts --description 'Generated code is not compatible with hardware interrupts'
complete -c gcc -o mcall-prologues --description 'Functions prologues/epilogues expanded as call to appropriate subroutines'
complete -c gcc -o mno-tablejump --description 'Do not generate tablejump insns which sometimes increase code size'
@@ -573,7 +571,7 @@ complete -c gcc -o mlow-64k --description 'When enabled, the compiler is free to
complete -c gcc -o mno-low-64k --description 'Assume that the program is arbitrarily large'
complete -c gcc -o mid-shared-library --description 'Generate code that supports shared libraries via the library ID method'
complete -c gcc -o mno-id-shared-library --description 'Generate code that doesn’t assume ID based shared libraries are being used'
-complete -c gcc -o mshared-library-id --description '=n Specified the identification number of the ID based shared library being compiled'
+complete -c gcc -o mshared-library-id -x --description 'Specified the identification number of the ID based shared library being compiled'
complete -c gcc -o mlong-calls --description 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o mno-long-calls --description 'Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register'
complete -c gcc -o march --description 'Generate code for the specified architecture'