Switch -ftrack-macro-expansion=2 on by default.
authorDodji Seketeli <dodji@redhat.com>
Mon, 30 Apr 2012 11:43:43 +0000 (11:43 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Mon, 30 Apr 2012 11:43:43 +0000 (13:43 +0200)
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.

From-SVN: r186977

gcc/ChangeLog
gcc/doc/cppopts.texi
libcpp/ChangeLog
libcpp/init.c

index c47ba21dde5882a12a805c19e96d12c9c3e80161..43d3f5daa04264e49ce065e88896ca082954d4c2 100644 (file)
@@ -1,5 +1,9 @@
 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
 
+       Switch -ftrack-macro-expansion=2 on by default.
+       * docs/cppopts.texi: Adjust for enabling -ftrack-macro-expansion=2
+       by default.
+
        Fix va_start related location
        * builtins.c (fold_builtin_next_arg): Unwinds to the first
        location in real source code.
index 205d87088335ed524eeb90c28a5d0fd0143874ca..27b10952976ef123bd41a94876d4cf9af452bdd2 100644 (file)
@@ -617,6 +617,8 @@ tokens locations completely. This value is the most memory hungry.
 When this option is given no argument, the default parameter value is
 @samp{2}.
 
+Note that -ftrack-macro-expansion=2 is activated by default.
+
 @item -fexec-charset=@var{charset}
 @opindex fexec-charset
 @cindex character set, execution
index 2c05214d4f7ad0263c17524c732fea61c0eda8aa..271148cc07d064b73103e3b275389899dee93fde 100644 (file)
@@ -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.
index 3262184c9c5e603636a4ff94c3a801ec998157d6..7752fea17aca85d2eb2ef33950d499e5fd1ea443 100644 (file)
@@ -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;