2016-02-06 78 views

回答

3

-std=c99沒問題,但是-std c99是一個錯誤。 --std c99--std=c99一樣有效。這是唯一的區別。

你可以看到,它們映射到同一個動作opts-common.c

struct option_map 
{ 
    /* Prefix of the option on the command line. */ 
    const char *opt0; 
    /* If two argv elements are considered to be merged into one option, 
    prefix for the second element, otherwise NULL. */ 
    const char *opt1; 
    /* The new prefix to map to. */ 
    const char *new_prefix; 
    /* Whether at least one character is needed following opt1 or opt0 
    for this mapping to be used. (--optimize= is valid for -O, but 
    --warn- is not valid for -W.) */ 
    bool another_char_needed; 
    /* Whether the original option is a negated form of the option 
    resulting from this map. */ 
    bool negated; 
}; 

static const struct option_map option_map[] = 
    { 
    ... 
    { "--std=", NULL, "-std=", false, false }, 
    { "--std", "", "-std=", false, false }, 
    ... 
    }; 
+0

謝謝!我不知道! –

相關問題