aboutsummaryrefslogtreecommitdiff
path: root/libcpp/internal.h
diff options
context:
space:
mode:
authorGary Funck <gary@intrepid.com>2012-01-09 08:48:43 +0000
committerGary Funck <gfunck@gcc.gnu.org>2012-01-09 08:48:43 +0000
commitb492b6862ef38c3a8c7a67f4c410dcf69434507d (patch)
tree2b2f237168b3048e8f7a77942d33aaf369c7cae0 /libcpp/internal.h
parentfdff9f3d33732e60f9c1a22e4a3c40a3aeea7447 (diff)
downloadgcc-b492b6862ef38c3a8c7a67f4c410dcf69434507d.zip
gcc-b492b6862ef38c3a8c7a67f4c410dcf69434507d.tar.gz
gcc-b492b6862ef38c3a8c7a67f4c410dcf69434507d.tar.bz2
re PR preprocessor/33919 (__BASE_FILE__ does not expand correctly when included from the command line)
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. From-SVN: r183003
Diffstat (limited to 'libcpp/internal.h')
-rw-r--r--libcpp/internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h
index 7e2932a..5b3731b 100644
--- a/libcpp/internal.h
+++ b/libcpp/internal.h
@@ -1,6 +1,6 @@
/* Part of CPP library.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
- 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -635,6 +635,7 @@ extern void _cpp_cleanup_files (cpp_reader *);
extern void _cpp_pop_file_buffer (cpp_reader *, struct _cpp_file *);
extern bool _cpp_save_file_entries (cpp_reader *pfile, FILE *f);
extern bool _cpp_read_file_entries (cpp_reader *, FILE *);
+extern const char *_cpp_get_file_name (_cpp_file *);
extern struct stat *_cpp_get_file_stat (_cpp_file *);
/* In expr.c */