This is the mail archive of the gcc-bugs@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]

[Bug preprocessor/33919] __BASE_FILE__ does not expand correctly when included from the command line


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


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