Returning "false" onto "char *" is actually questionable. /pub/unpacked/gcc-3.4.0/gcc/cppinit.c:471: incompatible types in return
Confirmed. Caused by: * cppinit.c (cpp_read_main_file): Split into two functions: Distribute _cpp_stack_file call over the two functions. (cpp_find_main_file): New function. Don't call _cpp_do_file_change even if working_directory flag set. (cpp_push_main_file): New function. * cppfiles.c (_cpp_find_failed): New helper function. (find_file): Made non-static and renamed to _cpp_find_file. (_cpp_stack_file): No longer needed. But note the following. (stack_file): Made non-static and renamed to _cpp_stack_file. * fix-header.c (cpp_read_main_file): Replace cpp_read_main_file call with calls to cpp_find_main_file and cpp_push_main_file. (search_path_head): If there is no current buffer, use main_file. * cpphash.h: Update function declarations. * cpplib.h: Update function declarations.
Subject: Bug 15067 CVSROOT: /cvs/gcc Module name: gcc Changes by: bothner@gcc.gnu.org 2004-04-23 01:41:21 Modified files: gcc : cppinit.c ChangeLog Log message: * cppinit.c (cpp_read_main_file): Return NULL rather than false. Fixes PR preprocessor/15067. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cppinit.c.diff?cvsroot=gcc&r1=1.304&r2=1.305 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3465&r2=2.3466
Subject: Bug 15067 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: bothner@gcc.gnu.org 2004-04-23 01:44:08 Modified files: gcc : cppinit.c ChangeLog Log message: * cppinit.c (cpp_read_main_file): Return NULL rather than false. Fixes PR preprocessor/15067. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cppinit.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.297.6.4&r2=1.297.6.5 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.413&r2=2.2326.2.414
Patch checked into mainline and 3.4 branch.
*** Bug 15536 has been marked as a duplicate of this bug. ***
Subject: Bug 15067 CVSROOT: /cvs/gcc Module name: gcc Branch: csl-arm-branch Changes by: pbrook@gcc.gnu.org 2005-10-25 15:05:37 Modified files: gcc : ChangeLog ChangeLog.csl-arm cppinit.c Log message: 2005-10-25 Paul Brook <paul@codesourcery.com> Backport form gcc-3_4-branch 2004-04-22 Per Bothner <per@bothner.com> * cppinit.c (cpp_read_main_file): Return NULL rather than false. Fixes PR preprocessor/15067. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=2.1568.2.99&r2=2.1568.2.100 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.csl-arm.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.1.2.150&r2=1.1.2.151 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cppinit.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.296.4.4&r2=1.296.4.5