rpms/gcc/devel gcc43-cpp-pragma.patch, NONE, 1.1 gcc43-java-debug-iface-type.patch, NONE, 1.1 .cvsignore, 1.218, 1.219 gcc43.spec, 1.9, 1.10 sources, 1.220, 1.221
Jakub Jelinek (jakub)
fedora-extras-commits at redhat.com
Fri Jan 25 17:07:53 UTC 2008
Author: jakub
Update of /cvs/pkgs/rpms/gcc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30477
Modified Files:
.cvsignore gcc43.spec sources
Added Files:
gcc43-cpp-pragma.patch gcc43-java-debug-iface-type.patch
Log Message:
4.3.0-0.6
gcc43-cpp-pragma.patch:
--- NEW FILE gcc43-cpp-pragma.patch ---
2008-01-24 Jakub Jelinek <jakub at redhat.com>
* c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
and CPP_PRAGMA_EOL.
* c-pragma.c (pragma_ns_name): New typedef.
(registered_pp_pragmas): New variable.
(c_pp_lookup_pragma): New function.
(c_register_pragma_1): If flag_preprocess_only, do nothing
for non-expanded pragmas, for expanded ones push pragma's
namespace and name into registered_pp_pragmas vector.
(c_invoke_pragma_handler): Register OpenMP pragmas even when
flag_preprocess_only, don't register GCC pch_preprocess
pragma if flag_preprocess_only.
* c-opts.c (c_common_init): Call init_pragma even if
flag_preprocess_only.
* c-pragma.c (c_pp_lookup_pragma): New prototype.
* config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
cpp_register_pragma if flag_preprocess_only.
* gcc.dg/gomp/preprocess-1.c: New test.
--- gcc/c-ppoutput.c.jj 2007-09-07 10:29:37.000000000 +0200
+++ gcc/c-ppoutput.c 2008-01-24 12:27:31.000000000 +0100
@@ -1,6 +1,6 @@
/* Preprocess only, using cpplib.
- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
+ 2008 Free Software Foundation, Inc.
Written by Per Bothner, 1994-95.
This program is free software; you can redistribute it and/or modify it
@@ -177,7 +177,24 @@ scan_translation_unit (cpp_reader *pfile
avoid_paste = false;
print.source = NULL;
print.prev = token;
- cpp_output_token (token, print.outf);
+ if (token->type == CPP_PRAGMA)
+ {
+ const char *space;
+ const char *name;
+
+ maybe_print_line (token->src_loc);
+ fputs ("#pragma ", print.outf);
+ c_pp_lookup_pragma (token->val.pragma, &space, &name);
+ if (space)
+ fprintf (print.outf, "%s %s", space, name);
+ else
+ fprintf (print.outf, "%s", name);
+ print.printed = 1;
+ }
+ else if (token->type == CPP_PRAGMA_EOL)
+ maybe_print_line (token->src_loc);
+ else
+ cpp_output_token (token, print.outf);
if (token->type == CPP_COMMENT)
account_for_newlines (token->val.str.text, token->val.str.len);
--- gcc/c-pragma.c.jj 2007-08-13 15:11:18.000000000 +0200
+++ gcc/c-pragma.c 2008-01-24 11:58:18.000000000 +0100
@@ -1,6 +1,6 @@
/* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -871,6 +871,59 @@ DEF_VEC_ALLOC_O (pragma_handler, heap);
static VEC(pragma_handler, heap) *registered_pragmas;
+typedef struct
+{
+ const char *space;
+ const char *name;
+} pragma_ns_name;
+
+DEF_VEC_O (pragma_ns_name);
+DEF_VEC_ALLOC_O (pragma_ns_name, heap);
+
+static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
+
+void
+c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
+{
+ *space = NULL;
+ *name = NULL;
+ switch (id)
+ {
+ case PRAGMA_OMP_ATOMIC: *name = "atomic"; break;
+ case PRAGMA_OMP_BARRIER: *name = "barrier"; break;
+ case PRAGMA_OMP_CRITICAL: *name = "critical"; break;
+ case PRAGMA_OMP_FLUSH: *name = "flush"; break;
+ case PRAGMA_OMP_FOR: *name = "for"; break;
+ case PRAGMA_OMP_MASTER: *name = "master"; break;
+ case PRAGMA_OMP_ORDERED: *name = "ordered"; break;
+ case PRAGMA_OMP_PARALLEL: *name = "parallel"; break;
+ case PRAGMA_OMP_SECTION: *name = "section"; break;
+ case PRAGMA_OMP_SECTIONS: *name = "sections"; break;
+ case PRAGMA_OMP_SINGLE: *name = "single"; break;
+ case PRAGMA_OMP_THREADPRIVATE: *name = "threadprivate"; break;
+ default: break;
+ }
+
+ if (*name)
+ {
+ *space = "omp";
+ return;
+ }
+
+ if (id >= PRAGMA_FIRST_EXTERNAL
+ && (id < PRAGMA_FIRST_EXTERNAL
+ + VEC_length (pragma_ns_name, registered_pp_pragmas)))
+ {
+ *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
+ id - PRAGMA_FIRST_EXTERNAL)->space;
+ *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
+ id - PRAGMA_FIRST_EXTERNAL)->name;
+ return;
+ }
+
+ gcc_unreachable ();
+}
+
/* Front-end wrappers for pragma registration to avoid dragging
cpplib.h in almost everywhere. */
@@ -880,13 +933,29 @@ c_register_pragma_1 (const char *space,
{
unsigned id;
- VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
- id = VEC_length (pragma_handler, registered_pragmas);
- id += PRAGMA_FIRST_EXTERNAL - 1;
-
- /* The C++ front end allocates 6 bits in cp_token; the C front end
- allocates 7 bits in c_token. At present this is sufficient. */
- gcc_assert (id < 64);
+ if (flag_preprocess_only)
+ {
+ pragma_ns_name ns_name;
+
+ if (!allow_expansion)
+ return;
+
+ ns_name.space = space;
+ ns_name.name = name;
+ VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, &ns_name);
+ id = VEC_length (pragma_ns_name, registered_pp_pragmas);
+ id += PRAGMA_FIRST_EXTERNAL - 1;
+ }
+ else
+ {
+ VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
+ id = VEC_length (pragma_handler, registered_pragmas);
+ id += PRAGMA_FIRST_EXTERNAL - 1;
+
+ /* The C++ front end allocates 6 bits in cp_token; the C front end
+ allocates 7 bits in c_token. At present this is sufficient. */
+ gcc_assert (id < 64);
+ }
cpp_register_deferred_pragma (parse_in, space, name, id,
allow_expansion, false);
@@ -920,7 +989,7 @@ c_invoke_pragma_handler (unsigned int id
void
init_pragma (void)
{
- if (flag_openmp && !flag_preprocess_only)
+ if (flag_openmp)
{
struct omp_pragma_def { const char *name; unsigned int id; };
static const struct omp_pragma_def omp_pragmas[] = {
@@ -946,8 +1015,9 @@ init_pragma (void)
omp_pragmas[i].id, true, true);
}
- cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
- PRAGMA_GCC_PCH_PREPROCESS, false, false);
+ if (!flag_preprocess_only)
+ cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
+ PRAGMA_GCC_PCH_PREPROCESS, false, false);
#ifdef HANDLE_PRAGMA_PACK
#ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
--- gcc/c-opts.c.jj 2008-01-22 15:12:11.000000000 +0100
+++ gcc/c-opts.c 2008-01-24 11:50:39.000000000 +0100
@@ -1,5 +1,5 @@
/* C/ObjC/C++ command line option handling.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Neil Booth.
@@ -1238,6 +1238,9 @@ c_common_init (void)
if (version_flag)
c_common_print_pch_checksum (stderr);
+ /* Has to wait until now so that cpplib has its hash table. */
+ init_pragma ();
+
if (flag_preprocess_only)
{
finish_options ();
@@ -1245,9 +1248,6 @@ c_common_init (void)
return false;
}
- /* Has to wait until now so that cpplib has its hash table. */
- init_pragma ();
-
return true;
}
--- gcc/c-pragma.h.jj 2007-09-14 11:54:36.000000000 +0200
+++ gcc/c-pragma.h 2008-01-24 11:50:28.000000000 +0100
@@ -1,6 +1,6 @@
/* Pragma related interfaces.
Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007 Free Software Foundation, Inc.
+ 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -124,4 +124,6 @@ extern enum cpp_ttype pragma_lex (tree *
extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *,
int);
+extern void c_pp_lookup_pragma (unsigned int, const char **, const char **);
+
#endif /* GCC_C_PRAGMA_H */
--- gcc/config/darwin.h.jj 2007-10-11 10:54:22.000000000 +0200
+++ gcc/config/darwin.h 2008-01-24 11:48:48.000000000 +0100
@@ -892,8 +892,9 @@ enum machopic_addr_class {
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
do { \
- cpp_register_pragma (parse_in, NULL, "mark", \
- darwin_pragma_ignore, false); \
+ if (!flag_preprocess_only) \
+ cpp_register_pragma (parse_in, NULL, "mark", \
+ darwin_pragma_ignore, false); \
c_register_pragma (0, "options", darwin_pragma_options); \
c_register_pragma (0, "segment", darwin_pragma_ignore); \
c_register_pragma (0, "unused", darwin_pragma_unused); \
--- gcc/testsuite/gcc.dg/gomp/preprocess-1.c.jj 2008-01-24 12:32:02.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/preprocess-1.c 2008-01-24 12:35:40.000000000 +0100
@@ -0,0 +1,16 @@
+/* { dg-do preprocess } */
+
+void foo (void)
+{
+ int i1, j1, k1;
+#define p parallel
+#define P(x) private (x##1)
+#define S(x) shared (x##1)
+#define F(x) firstprivate (x##1)
+#pragma omp p P(i) \
+ S(j) \
+ F(k)
+ ;
+}
+
+/* { dg-final { scan-file preprocess-1.i "(^|\n)#pragma omp parallel private \\(i1\\) shared \\(j1\\) firstprivate \\(k1\\)($|\n)" } } */
gcc43-java-debug-iface-type.patch:
--- NEW FILE gcc43-java-debug-iface-type.patch ---
2008-01-25 Jakub Jelinek <jakub at redhat.com>
* lang.c (java_classify_record): Revert 2007-12-20 change.
--- gcc/java/lang.c 2007-12-27 09:09:49.000000000 +0100
+++ gcc/java/lang.c 2008-01-25 17:43:57.000000000 +0100
@@ -965,9 +965,7 @@ java_classify_record (tree type)
if (! CLASS_P (type))
return RECORD_IS_STRUCT;
- /* ??? GDB does not support DW_TAG_interface_type as of December,
- 2007. Re-enable this at a later time. */
- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
+ if (CLASS_INTERFACE (TYPE_NAME (type)))
return RECORD_IS_INTERFACE;
return RECORD_IS_CLASS;
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.218
retrieving revision 1.219
diff -u -r1.218 -r1.219
--- .cvsignore 10 Jan 2008 21:09:13 -0000 1.218
+++ .cvsignore 25 Jan 2008 17:07:14 -0000 1.219
@@ -1,2 +1,2 @@
-gcc-4.3.0-20080110.tar.bz2
+gcc-4.3.0-20080125.tar.bz2
fastjar-0.95.tar.gz
Index: gcc43.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/gcc43.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- gcc43.spec 10 Jan 2008 21:09:13 -0000 1.9
+++ gcc43.spec 25 Jan 2008 17:07:14 -0000 1.10
@@ -1,6 +1,6 @@
-%define DATE 20080110
+%define DATE 20080125
%define gcc_version 4.3.0
-%define gcc_release 0.5
+%define gcc_release 0.6
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@@ -138,6 +138,8 @@
Patch9: gcc43-pr33763.patch
Patch10: gcc43-rh330771.patch
Patch11: gcc43-rh341221.patch
+Patch12: gcc43-cpp-pragma.patch
+Patch13: gcc43-java-debug-iface-type.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -432,6 +434,8 @@
%patch9 -p0 -b .pr33763~
%patch10 -p0 -b .rh330771~
%patch11 -p0 -b .rh341221~
+%patch12 -p0 -b .cpp-pragma.patch
+%patch13 -p0 -b .java-debug-iface-type
tar xzf %{SOURCE4}
@@ -1645,6 +1649,9 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Fri Jan 10 2008 Jakub Jelinek <jakub at redhat.com> 4.3.0-0.6
+- update from the trunk
+
* Thu Jan 10 2008 Jakub Jelinek <jakub at redhat.com> 4.3.0-0.5
- update from the trunk
- don't require on ppc/ppc64 libmudflap in gcc subpackage
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/sources,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -r1.220 -r1.221
--- sources 10 Jan 2008 21:09:13 -0000 1.220
+++ sources 25 Jan 2008 17:07:14 -0000 1.221
@@ -1,2 +1,2 @@
-7c36a96cc44b241ec68e4b287a2abd68 gcc-4.3.0-20080110.tar.bz2
+011827ce044badacd7265f6abd8a473d gcc-4.3.0-20080125.tar.bz2
92a70f9e56223b653bce0f58f90cf950 fastjar-0.95.tar.gz
More information about the fedora-extras-commits
mailing list