summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2016-01-07 17:48:09 -0500
committerNico Weber <thakis@chromium.org>2016-01-07 22:49:42 +0000
commitda223626cb3c2d6d027b63e5b868c530bf483643 (patch)
tree3c68c24308076dd8ebf9048f1662ced8b51328e6 /build/common.gypi
parent7b5d43b0e9474238a48be623cab9c5fa95ae2f42 (diff)
downloadchromium_src-da223626cb3c2d6d027b63e5b868c530bf483643.zip
chromium_src-da223626cb3c2d6d027b63e5b868c530bf483643.tar.gz
chromium_src-da223626cb3c2d6d027b63e5b868c530bf483643.tar.bz2
mac: Stop warning about missing newlines at eof.
Files without a newline on the last line used to have undefined behavior in C++03 (and still have undefined behavior in C). C++11 changed this, see the last sentence in [lex.phases]p1.2 (it used to say "If a source file [...] does not end in a new-line character [...], the behavior is undefined" in 03, now it says "A source file [...] that does not end in a new-line character [...], shall be processed as if an additional new-line character were appended to the file"). We used to tell clang to warn on this on Mac only. We should generally use matching warning flags on all platforms, so the choice is to turn this on everywhere, or turn it off on Mac. Turning it on everywhere is somewhat involved, see https://codereview.chromium.org/1566003002/ for a partial attempt. Many of the violations are in third-party code. Since the warning doesn't have any real benefit in practice (other than your terminal looking nicer if you `cat` such a file), and since it doesn't have a benefit in theory for C++11 translation units, turning off the warning on Mac seems like the way to go. BUG=573778 R=brettw@chromium.org Review URL: https://codereview.chromium.org/1569943002 . Cr-Commit-Position: refs/heads/master@{#368179}
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi1
1 files changed, 0 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi
index effc1f0..9bf1997 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -5062,7 +5062,6 @@
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
- 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
'USE_HEADERMAP': 'NO',
'WARNING_CFLAGS': [
'-Wall',