aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2015-10-22 23:48:17 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2015-10-22 17:48:17 -0600
commitffbd5e09b7851d579034fb1ca7efc0703fc2ee30 (patch)
tree18c7f34de19378ea3c4eab48ff6052b83bd035f4 /gcc
parentefee9dc4863288a7959873237ddf05935e2c60b7 (diff)
downloadgcc-ffbd5e09b7851d579034fb1ca7efc0703fc2ee30.zip
gcc-ffbd5e09b7851d579034fb1ca7efc0703fc2ee30.tar.gz
gcc-ffbd5e09b7851d579034fb1ca7efc0703fc2ee30.tar.bz2
re PR driver/68043 (many undocumented options, missing punctuation)
gcc/ChangeLog: 2015-10-22 Martin Sebor <msebor@redhat.com> PR driver/68043 * config/i386/i386.opt: Add missing periods to the ends of sentences. * config/msp430/msp430.opt: Same. gcc/testsuite/ChangeLog: 2015-10-22 Martin Sebor <msebor@redhat.com> PR driver/68043 * gcc.misc-tests/help.exp: Verify that option descriptions end in periods. * lib/options.exp (check_for_options): Use the regexp --line option. Print unexpected match on failure. From-SVN: r229205
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.opt12
-rw-r--r--gcc/config/msp430/msp430.opt4
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.misc-tests/help.exp49
-rw-r--r--gcc/testsuite/lib/options.exp8
6 files changed, 67 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 85c23fd..cdc9bfd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-22 Martin Sebor <msebor@redhat.com>
+
+ PR driver/68043
+ * config/i386/i386.opt: Add missing periods to the ends of sentences.
+ * config/msp430/msp430.opt: Same.
+
2015-10-21 David Wohlferd <dw@LimeGreenSocks.com>
* doc/extend.exp (Global Register Variables): Rewrite.
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index 8acf0f4..82de21f 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -104,7 +104,7 @@ enum asm_dialect x_ix86_asm_dialect
TargetSave
int x_ix86_branch_cost
-;; -mdump-tune-features=
+;; -mdump-tune-features=
TargetSave
int x_ix86_dump_tunes
@@ -112,7 +112,7 @@ int x_ix86_dump_tunes
TargetSave
int x_ix86_force_align_arg_pointer
-;; -mforce-drap=
+;; -mforce-drap=
TargetSave
int x_ix86_force_drap
@@ -124,7 +124,7 @@ int x_ix86_incoming_stack_boundary_arg
TargetSave
enum pmode x_ix86_pmode
-;; -mpreferred-stack-boundary=
+;; -mpreferred-stack-boundary=
TargetSave
int x_ix86_preferred_stack_boundary_arg
@@ -701,15 +701,15 @@ Support MMX, SSE, SSE2, SSE3 and SSE4A built-in functions and code generation.
mfma4
Target Report Mask(ISA_FMA4) Var(ix86_isa_flags) Save
-Support FMA4 built-in functions and code generation
+Support FMA4 built-in functions and code generation.
mxop
Target Report Mask(ISA_XOP) Var(ix86_isa_flags) Save
-Support XOP built-in functions and code generation
+Support XOP built-in functions and code generation.
mlwp
Target Report Mask(ISA_LWP) Var(ix86_isa_flags) Save
-Support LWP built-in functions and code generation
+Support LWP built-in functions and code generation.
mabm
Target Report Mask(ISA_ABM) Var(ix86_isa_flags) Save
diff --git a/gcc/config/msp430/msp430.opt b/gcc/config/msp430/msp430.opt
index 269c834..108c2ec 100644
--- a/gcc/config/msp430/msp430.opt
+++ b/gcc/config/msp430/msp430.opt
@@ -83,8 +83,8 @@ Enum(msp430_regions) String(upper) Value(UPPER)
msilicon-errata=
Target Joined RejectNegative Report ToLower
-Passes on a request to the assembler to enable fixes for various silicon errata
+Passes on a request to the assembler to enable fixes for various silicon errata.
msilicon-errata-warn=
Target Joined RejectNegative Report ToLower
-Passes on a request to the assembler to warn about various silicon errata
+Passes on a request to the assembler to warn about various silicon errata.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cca6c68..761029d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2015-10-22 Martin Sebor <msebor@redhat.com>
+
+ PR driver/68043
+ * gcc.misc-tests/help.exp: Verify that option descriptions
+ end in periods.
+ * lib/options.exp (check_for_options): Use the regexp --line option.
+ Print unexpected match on failure.
+
2015-10-22 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/pr67985-3.c (dg-options): Add -mfpmath=sse.
diff --git a/gcc/testsuite/gcc.misc-tests/help.exp b/gcc/testsuite/gcc.misc-tests/help.exp
index be36c85..df85fd0 100644
--- a/gcc/testsuite/gcc.misc-tests/help.exp
+++ b/gcc/testsuite/gcc.misc-tests/help.exp
@@ -29,6 +29,18 @@ if ![gcc_parallel_test_run_p help] {
}
gcc_parallel_test_enable 0
+# GCC breaks up --help output into lines at most $COLUMNS characters
+# wide (or 80 when COLUMNS is not defined), set the COLUMNS environment
+# variable to a value large enough to prevent this (and restore it when
+# done).
+global env
+
+if [ info exists env(COLUMNS) ] {
+ set prev_columns $env(COLUMNS)
+}
+
+set env(COLUMNS) 1024
+
# Document --version. Ideally, there should be no undocumented switches
# in --help.
check_for_options c "--help" "--version" "This option lacks documentation" ""
@@ -81,25 +93,44 @@ maximum number of
# Specify patterns (arguments 3 and later) that match option names
# at the beginning of the line and not when they are referenced by
# some other options later on.
-# The (?w) Tcl embedded option tells the Tcl regexp parser to treat
-# the '^' character as an anchor.
check_for_options c "--help=joined" \
- "(?w)^ *-Wformat=" "(?w)^ *-fstrict-prototype" ""
+ "^ +-Wformat=" "^ +-fstrict-prototype" ""
check_for_options c "--help=separate" \
- "(?w)^ *-MF" "(?w)^ *-fstrict-prototype" ""
+ "^ +-MF" "^ +-fstrict-prototype" ""
check_for_options c "--help=warnings,joined" \
- "(?w)^ *-Wformat=" "(?w)^ *-Wtrigraphs" ""
+ "^ +-Wformat=" "^ +-Wtrigraphs" ""
check_for_options c "--help=warnings,^joined" \
- "(?w)^ *-Wtrigraphs" "(?w)^ *-Wformat=" ""
+ "^ +-Wtrigraphs" "^ +-Wformat=" ""
check_for_options c "--help=joined,separate" \
- "(?w)^ *-I" "" ""
+ "^ +-I" "" ""
check_for_options c "--help=^joined,separate" \
- "(?w)^ *--param " "" ""
+ "^ +--param " "" ""
check_for_options c "--help=joined,^separate" \
- "(?w)^ *--help=" "" ""
+ "^ +--help=" "" ""
check_for_options c "--help=joined,undocumented" "" "" ""
+# Check to make sure the description for every option is a complete
+# sentence ending in a period. This matters not just for consistency
+# but also because other sentences may be appended to it by the help
+# subsystem. Do this one help class at a time to make it easier to
+# find the source a failure.
+
+foreach cls { "ada" "c" "c++" "fortran" "go" \
+ "optimizers" "param" "target" "warnings" } {
+
+ check_for_options c "--help=$cls" "" "^ +-.*\[^:.\]$" ""
+}
+
# Listing only excludes gives empty results.
check_for_options c "--help=^joined,^separate" "" "" ""
+if [ info exists prev_columns ] {
+ # Reset the enviroment variable to its oriuginal value.
+ set env(COLUMNS) $prev_columns
+} else {
+ # Remove the variable from the environment if it didn't exist
+ # to begin with to avoid affecting subsequent tests.
+ array unset env COLUMNS
+}
+
gcc_parallel_test_enable 1
diff --git a/gcc/testsuite/lib/options.exp b/gcc/testsuite/lib/options.exp
index d1dacda..a78c119 100644
--- a/gcc/testsuite/lib/options.exp
+++ b/gcc/testsuite/lib/options.exp
@@ -50,7 +50,7 @@ proc check_for_options {language gcc_options compiler_patterns compiler_non_patt
# Verify that COMPILER_PATTERRNS appear in gcc output.
foreach pattern [split $compiler_patterns "\n"] {
if {$pattern != ""} {
- if {[regexp -- "$pattern" $gcc_output]} {
+ if {[regexp -line -- "$pattern" $gcc_output]} {
pass "$test $pattern"
} else {
if {$expected_failure != ""} {
@@ -65,13 +65,15 @@ proc check_for_options {language gcc_options compiler_patterns compiler_non_patt
# Verify that COMPILER_NON_PATTERRNS do not appear in gcc output.
foreach pattern [split $compiler_non_patterns "\n"] {
if {$pattern != ""} {
- if {![regexp -- "$pattern" $gcc_output]} {
+ if {![regexp -line -- "$pattern" $gcc_output result]} {
pass "$test $pattern"
} else {
if {$expected_failure != ""} {
xfail "$test \"$pattern\" absent from output"
} else {
- fail "$test \"$pattern\" absent from output"
+ # Print the unexpected line that caused the failure
+ # to make it easier to find in the multiline output.
+ fail "$test \"$pattern\" absent from output: \"$result\""
}
}
}