diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-30 11:43:43 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-30 11:43:43 +0000 |
commit | 611f1003dbf4ebb341c2eda0fcc0e058c421eb6b (patch) | |
tree | fbed8c17b298f0df7dcae081b3c843995b665292 /libcpp | |
parent | 053213c19e93889b0075ff1a4f586f11a3fb59da (diff) | |
download | gcc-611f1003dbf4ebb341c2eda0fcc0e058c421eb6b.tar.gz |
Switch -ftrack-macro-expansion=2 on by default.
This switches the compiler to -ftrack-macro-expansion=2 by default.
Tested and bootstrapped on x86_64-unknown-linux-gnu against trunk.
libcpp/
* init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on
by default. Add comments.
gcc/docs/
* cppopts.texi: Adjust for enabling -ftrack-macro-expansion=2 by
default.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186977 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rw-r--r-- | libcpp/init.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 2c05214d4f7..271148cc07d 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,5 +1,9 @@ 2012-04-30 Dodji Seketeli <dodji@redhat.com> + Switch -ftrack-macro-expansion=2 on by default. + * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on + by default. Add comments. + Strip "<built-in>" loc from displayed expansion context * include/line-map.h (linemap_unwind_toward_expansion): Fix typo in comment. diff --git a/libcpp/init.c b/libcpp/init.c index 3262184c9c5..7752fea17ac 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -174,6 +174,12 @@ cpp_create_reader (enum c_lang lang, hash_table *table, CPP_OPTION (pfile, warn_dollars) = 1; CPP_OPTION (pfile, warn_variadic_macros) = 1; CPP_OPTION (pfile, warn_builtin_macro_redefined) = 1; + /* By default, track locations of tokens resulting from macro + expansion. The '2' means, track the locations with the highest + accuracy. Read the comments for struct + cpp_options::track_macro_expansion to learn about the other + values. */ + CPP_OPTION (pfile, track_macro_expansion) = 2; CPP_OPTION (pfile, warn_normalize) = normalized_C; CPP_OPTION (pfile, warn_literal_suffix) = 1; |