[Bug preprocessor/33919] __BASE_FILE__ does not expand correctly when included from the command line
gfunck at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 9 08:49:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33919
--- Comment #6 from gfunck at gcc dot gnu.org 2012-01-09 08:48:51 UTC ---
Author: gfunck
Date: Mon Jan 9 08:48:43 2012
New Revision: 183003
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183003
Log:
libcpp/
PR preprocessor/33919
* files.c (_cpp_get_file_name): New. Implement file name
access function.
* internal.h (_cpp_get_file_name): New prototype.
* macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name()
to use pfile->main_file in lieu of traversing INCLUDED_FROM chain.
gcc/testsuite/
PR preprocessor/33919
* gcc.dg/pr33919.c: New test.
* gcc.dg/pr33919-0.h: New test header file.
* gcc.dg/pr33919-1.h: Ditto.
* gcc.dg/pr33919-2.h: Ditto.
Added:
trunk/gcc/testsuite/gcc.dg/pr33919-0.h
trunk/gcc/testsuite/gcc.dg/pr33919-1.h
trunk/gcc/testsuite/gcc.dg/pr33919-2.h
trunk/gcc/testsuite/gcc.dg/pr33919.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libcpp/ChangeLog
trunk/libcpp/files.c
trunk/libcpp/internal.h
trunk/libcpp/macro.c
More information about the Gcc-bugs
mailing list