This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix #line syntax checks (PR 39647)



On Apr 18, 2009, at 1:26 PM, Joseph S. Myers wrote:


On Sat, 18 Apr 2009, Chris Lattner wrote:


On Apr 18, 2009, at 8:29 AM, Joseph S. Myers wrote:


This patch fixes PR 39647, a preprocessor bug where #line directives
failed to allow for macros expanding to nothing after the initial line
number and file name.


Bootstrapped with no regressions on x86_64-unknown-linux-gnu. Applied
to mainline.

Does this patch permit:


#define EMPTY
#include <limits.h> EMPTY
#include "limits.h" EMPTY

? If not, I think that's a bug (at least in c99)

Thanks for pointing out this case, I've applied this followup patch to fix
it as well.

Happy to help, I just happened to fix the same flavor of bugs in Clang yesterday.


-Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]