Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-15 Thread Dodji Seketeli
Hello Nicholas, Nicholas Ormrod writes: [...] > If you are also going to fix the locations of built-in tokens, it > would also be worth adjusting their expansion locations. As mentioned > in the bug report, built-in tokens are expanded at the closing paren > of a macro call, whereas non-built-i

Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-15 Thread Dodji Seketeli
Hello, Jason Merrill writes: >> // preprocessed output >> # 3 "test.cpp" 3 4 >> sys_token >> # 3 "test.cpp" >> 3 >> # 3 "test.cpp" 3 4 >> sys_token >>> Yeah. For Built-in tokens that are expanded like that we only do track their the location of their expans

RE: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-10 Thread Nicholas Ormrod
The fact that extra line directives are inserted around built-in tokens isn't ideal, but I must concur with Dodji's assessment that such a fix belongs in a separate patch. The purpose of this patch is to resolve a discrepancy between integrated-cpp and non-integrated-cpp. The locations of built-in

Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-10 Thread Jason Merrill
On 07/10/2014 08:13 AM, Dodji Seketeli wrote: Jason Merrill writes: On 07/04/2014 05:13 AM, Dodji Seketeli wrote: // preprocessed output # 3 "test.cpp" 3 4 sys_token # 3 "test.cpp" 3 # 3 "test.cpp" 3 4 sys_token Yeah. For Built-in tokens that are expanded like that we only do track their

Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-10 Thread Dodji Seketeli
Jason Merrill writes: > On 07/04/2014 05:13 AM, Dodji Seketeli wrote: >>> >// preprocessed output >>> ># 3 "test.cpp" 3 4 >>> >sys_token >>> ># 3 "test.cpp" >>> >3 >>> ># 3 "test.cpp" 3 4 >>> >sys_token > >> Yeah. For Built-in tokens that are expanded like that we only do track >> their the loca

Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-06 Thread Jason Merrill
On 07/04/2014 05:13 AM, Dodji Seketeli wrote: >// preprocessed output ># 3 "test.cpp" 3 4 >sys_token ># 3 "test.cpp" >3 ># 3 "test.cpp" 3 4 >sys_token Yeah. For Built-in tokens that are expanded like that we only do track their the location of their expansion, not their spelling location. So

Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-04 Thread Dodji Seketeli
Hello Nicholas, Nicholas Ormrod writes: > I found time this morning to run your changes through our system. I > patched our gcc-4.8.1 with your latest change, and ran it through our > folly testsuite. Thanks! > One thing that I immediately noticed was that this increased the preprocessed > si

RE: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-03 Thread Nicholas Ormrod
Hello Dodji, I found time this morning to run your changes through our system. I patched our gcc-4.8.1 with your latest change, and ran it through our folly testsuite. One thing that I immediately noticed was that this increased the preprocessed size substantially. When preprocessing my favori

Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-07-03 Thread Dodji Seketeli
Jason Merrill writes: > On 06/27/2014 03:27 AM, Dodji Seketeli wrote: >> + && print.prev_was_system_token != !!in_system_header_at(loc)) >> +/* The system-ness of this token is different from the one >> + of the previous token. Let's emit a line change to >> +

Re: [PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-06-27 Thread Jason Merrill
On 06/27/2014 03:27 AM, Dodji Seketeli wrote: + && print.prev_was_system_token != !!in_system_header_at(loc)) + /* The system-ness of this token is different from the one + of the previous token. Let's emit a line change to + mark the new system-ne

[PATCH] PR preprocessor/60723 - missing system-ness marks for macro

2014-06-27 Thread Dodji Seketeli
Hello, When a system macro is expanded in a non-system file during out-of-line preprocessing, it can happen that the preprocessor forgets to emit line markers to express the system-ness status of tokens that come after the expansion of the macro. That can lead to situations where the entire non-s