re PR c++/69145 (Bogus 'warning: #pragma implementation for ‘...’ appears after file is included')
PR c++/69145 * files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup real location from the line_table. * g++.dg/ext/pr69145-1.C: New test. * g++.dg/ext/pr69145-2-very-long-filename.cc: New file. * g++.dg/ext/pr69145-2.h: New file. From-SVN: r232150
This commit is contained in:
parent
52ad5601bf
commit
53290e072a
@ -1,3 +1,10 @@
|
||||
2016-01-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/69145
|
||||
* g++.dg/ext/pr69145-1.C: New test.
|
||||
* g++.dg/ext/pr69145-2-very-long-filename.cc: New file.
|
||||
* g++.dg/ext/pr69145-2.h: New file.
|
||||
|
||||
2016-01-07 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
PR c/68966
|
||||
|
4
gcc/testsuite/g++.dg/ext/pr69145-1.C
Normal file
4
gcc/testsuite/g++.dg/ext/pr69145-1.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/69145
|
||||
// { dg-do compile }
|
||||
#pragma implementation "pr69145-2-very-long-filename.cc" // { dg-bogus "appears after file is included" }
|
||||
#include "pr69145-2-very-long-filename.cc"
|
3
gcc/testsuite/g++.dg/ext/pr69145-2-very-long-filename.cc
Normal file
3
gcc/testsuite/g++.dg/ext/pr69145-2-very-long-filename.cc
Normal file
@ -0,0 +1,3 @@
|
||||
// PR c++/69145
|
||||
// { dg-do compile } */
|
||||
#include "pr69145-2.h"
|
3
gcc/testsuite/g++.dg/ext/pr69145-2.h
Normal file
3
gcc/testsuite/g++.dg/ext/pr69145-2.h
Normal file
@ -0,0 +1,3 @@
|
||||
#ifndef PR69145_2_H
|
||||
# define PR69145_2_H
|
||||
#endif
|
@ -1,3 +1,9 @@
|
||||
2016-01-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/69145
|
||||
* files.c (cpp_included_before): If IS_ADHOC_LOC (location), lookup
|
||||
real location from the line_table.
|
||||
|
||||
2016-01-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Update copyright years.
|
||||
|
@ -1224,10 +1224,12 @@ bool
|
||||
cpp_included_before (cpp_reader *pfile, const char *fname,
|
||||
source_location location)
|
||||
{
|
||||
struct cpp_file_hash_entry *entry;
|
||||
struct cpp_file_hash_entry *entry
|
||||
= (struct cpp_file_hash_entry *)
|
||||
htab_find_with_hash (pfile->file_hash, fname, htab_hash_string (fname));
|
||||
|
||||
entry = (struct cpp_file_hash_entry *)
|
||||
htab_find_with_hash (pfile->file_hash, fname, htab_hash_string (fname));
|
||||
if (IS_ADHOC_LOC (location))
|
||||
location = get_location_from_adhoc_loc (pfile->line_table, location);
|
||||
|
||||
while (entry && (entry->start_dir == NULL || entry->u.file->err_no
|
||||
|| entry->location > location))
|
||||
|
Loading…
Reference in New Issue
Block a user