Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8322757

Enable -Wparentheses warnings

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • None
    • infrastructure
    • None
    • b06

      The -Wparentheses warning option is enabled by -Wall. Avoiding this warning improves readability by requiring explicit parentheses (or refactoring) to make ordering among subexpressions explicit, rather than relying on obscure details of the operator precedence rules.

      Note that this option doesn't require complete parenthesization. Only combinations that the gcc community has decided are prone to mistakes are warned about.

      Currently this option is explicitly disabled. This is because there are some non-trivial number of scattered places in the code that trigger this warning.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: