Commit ccc01444 by Geoffrey Keating Committed by Geoffrey Keating

cpppch.c (cpp_valid_state): Re-add warning about PCH not used because some macro is defined.

2003-08-19  Geoffrey Keating  <geoffk@apple.com>

	* cpppch.c (cpp_valid_state): Re-add warning about PCH not used
	because some macro is defined.

Index: testsuite/ChangeLog
2003-08-19  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/pch/warn-1.c: New.
	* gcc.dg/pch/warn-1.hs: New.

	* lib/dg-pch.exp (dg-pch): Use 'return' not 'continue' to skip
	not-tested file.

From-SVN: r70592
parent a6f3e253
2003-08-19 Geoffrey Keating <geoffk@apple.com>
* cpppch.c (cpp_valid_state): Re-add warning about PCH not used
because some macro is defined.
* config/darwin.h (LINK_COMMAND_SPEC): Add -arch and -arch_only
options.
* config/i386/darwin.h (ASM_SPEC): New.
......
......@@ -509,7 +509,13 @@ cpp_valid_state (cpp_reader *r, const char *name, int fd)
else if (cmp > 0)
++i;
else
goto fail;
{
if (CPP_OPTION (r, warn_invalid_pch))
cpp_error (r, DL_WARNING_SYSHDR,
"%s: not used because `%s' is defined",
name, first);
goto fail;
}
}
free(nl.defs);
......
2003-08-19 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/pch/warn-1.c: New.
* gcc.dg/pch/warn-1.hs: New.
* lib/dg-pch.exp (dg-pch): Use 'return' not 'continue' to skip
not-tested file.
2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.dg/uninit-E.c: Add forgotten dg-warning marker.
......
/* { dg-options "-I. -Winvalid-pch" } */
#define DEFINED_VALUE 3
#include "warn-1.h"/* { dg-error "not used because `DEFINED_VALUE' is defined|No such file" } */
int main(void)
{
return DEFINED_VALUE;
}
enum {
DEFINED_VALUE
};
......@@ -21,7 +21,7 @@ proc dg-pch { subdir test options suffix } {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $test] {
continue
return
}
set nshort "$subdir/[file tail $test]"
set bname "[file rootname [file tail $nshort]]"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment