public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Melt] Add some includes to melt-run.proto.h
@ 2011-07-21  8:44 Romain Geissler
  2011-07-21  9:40 ` Basile Starynkevitch
  0 siblings, 1 reply; 5+ messages in thread
From: Romain Geissler @ 2011-07-21  8:44 UTC (permalink / raw)
  To: gcc-patches, gcc-melt

Hi,

I added a few includes i need to define some new primitives.

Basile, i included two "c-family/*.h" files, but be aware that currently
GCC does not install this headers in the c-family directory but in the
directly in the plugin/include root directory with all other headers. I posted
a patch some times ago to solve that (because it breaks includes of
C++ plugin headers) for the trunk. Unfortunately, the patch hasn't been
reviewed yet. See
http://old.nabble.com/-PLUGIN--c-family-files-installation-td32038394.html
Once again, Debian maintainers applied a similar patch for a long time
and thus theses files are in the c-family directory (but only for Debian
users).

So i don't know if you should apply the patch as is or remove
the "c-family/" prefix in the includes.

Romain Geissler

gcc/

2011-07-21  Romain Geissler  <romain.geissler@gmail.com>

	* melt-run.proto.h: Include "c-family/c-pragma.h",
	"c-family/c-pretty-print.h", "cpplib.h" and "langhooks.h".



Index: gcc/melt-run.proto.h
===================================================================
--- gcc/melt-run.proto.h	(revision 176395)
+++ gcc/melt-run.proto.h	(working copy)
@@ -52,6 +52,8 @@ along with GCC; see the file COPYING3.
 #include "timevar.h"
 #include "ggc.h"
 #include "cgraph.h"
+#include "c-family/c-pragma.h"
+#include "c-family/c-pretty-print.h"
 #include "diagnostic.h"
 #include "flags.h"
 #include "toplev.h"
@@ -61,6 +63,8 @@ along with GCC; see the file COPYING3.
 #include "prefix.h"
 #include "md5.h"
 #include "cppdefault.h"
+#include "cpplib.h"
+#include "langhooks.h"


 /* MELT specific includes */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Melt] Add some includes to melt-run.proto.h
  2011-07-21  8:44 [Melt] Add some includes to melt-run.proto.h Romain Geissler
@ 2011-07-21  9:40 ` Basile Starynkevitch
  2011-07-21 11:12   ` Romain Geissler
  0 siblings, 1 reply; 5+ messages in thread
From: Basile Starynkevitch @ 2011-07-21  9:40 UTC (permalink / raw)
  To: Romain Geissler; +Cc: gcc-patches, gcc-melt

On Thu, 21 Jul 2011 10:03:22 +0200
Romain Geissler <romain.geissler@gmail.com> wrote:

> Hi,
> 
> I added a few includes i need to define some new primitives.
> 
> Basile, i included two "c-family/*.h" files, but be aware that currently
> GCC does not install this headers in the c-family directory but in the
> directly in the plugin/include root directory with all other headers. I posted
> a patch some times ago to solve that (because it breaks includes of
> C++ plugin headers) for the trunk. Unfortunately, the patch hasn't been
> reviewed yet. See
> http://old.nabble.com/-PLUGIN--c-family-files-installation-td32038394.html
> Once again, Debian maintainers applied a similar patch for a long time
> and thus theses files are in the c-family directory (but only for Debian
> users).
> 
> So i don't know if you should apply the patch as is or remove
> the "c-family/" prefix in the includes.
> 
> Romain Geissler
> 
> gcc/
> 
> 2011-07-21  Romain Geissler  <romain.geissler@gmail.com>
> 
> 	* melt-run.proto.h: Include "c-family/c-pragma.h",
> 	"c-family/c-pretty-print.h", "cpplib.h" and "langhooks.h".
> 

Actually, we have the same issue in melt-runtime.c, which has
#include "c-pragma.h"

And I want badly MELT to be compilable as a plugin to an umodified gcc-4.6-plugin-dev
package on Debian.

I don't understand if it is an issue related to building GCC & its plugin with C++, or
it is an issue with 4.7 ?

I am tempted to put in melt-runtime.c something like

  /* Headers from c-family/ should be included directly with GCC4.6, but not with GCC 4.7
     or when compiling with a C++ compiler. */
  #if defined(GCCPLUGIN_VERSION) || MELT_GCC_VERSION>4006 || defined(__cplusplus)
  #include "c-family/c-pragma.h"
  #else
  #include "c-pragma.h"
  #endif

And likewise in melt-run.proto.h

What do you think? (I really want the MELT plugin to be compilable on an installed
gcc-4.6!)

Cheers
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Melt] Add some includes to melt-run.proto.h
  2011-07-21  9:40 ` Basile Starynkevitch
@ 2011-07-21 11:12   ` Romain Geissler
  2011-07-21 15:40     ` Romain Geissler
  0 siblings, 1 reply; 5+ messages in thread
From: Romain Geissler @ 2011-07-21 11:12 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: gcc-patches, gcc-melt

2011/7/21 Basile Starynkevitch <basile@starynkevitch.net>:
> And I want badly MELT to be compilable as a plugin to an umodified gcc-4.6-plugin-dev
> package on Debian.
>
> I don't understand if it is an issue related to building GCC & its plugin with C++, or
> it is an issue with 4.7 ?
>
> I am tempted to put in melt-runtime.c something like
>
>  /* Headers from c-family/ should be included directly with GCC4.6, but not with GCC 4.7
>     or when compiling with a C++ compiler. */
>  #if defined(GCCPLUGIN_VERSION) || MELT_GCC_VERSION>4006 || defined(__cplusplus)
>  #include "c-family/c-pragma.h"
>  #else
>  #include "c-pragma.h"
>  #endif
>
> And likewise in melt-run.proto.h
>
> What do you think? (I really want the MELT plugin to be compilable on an installed
> gcc-4.6!)

This will work for all case (iff my patch for the trunk is applied some day !)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Melt] Add some includes to melt-run.proto.h
  2011-07-21 11:12   ` Romain Geissler
@ 2011-07-21 15:40     ` Romain Geissler
  2011-07-21 16:10       ` Basile Starynkevitch
  0 siblings, 1 reply; 5+ messages in thread
From: Romain Geissler @ 2011-07-21 15:40 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: gcc-patches, gcc-melt

I have just updated to the latest svn revision, and it seems you
forgot to #include cpplib.h and langhooks.h.

Note about the c-family issue, you will be allowed to apply it (in the
trunk, and then in the melt branch) in 24 hours unless the plugin
maintainer block this one. I can't do it by myself as i don't have
write access to the svn repo.
See Joseph S. Myers post at
http://old.nabble.com/-PLUGIN--c-family-files-installation-td32038394.html

Romain Geissler

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Melt] Add some includes to melt-run.proto.h
  2011-07-21 15:40     ` Romain Geissler
@ 2011-07-21 16:10       ` Basile Starynkevitch
  0 siblings, 0 replies; 5+ messages in thread
From: Basile Starynkevitch @ 2011-07-21 16:10 UTC (permalink / raw)
  To: Romain Geissler; +Cc: gcc-patches, gcc-melt

On Thu, 21 Jul 2011 17:32:40 +0200
Romain Geissler <romain.geissler@gmail.com> wrote:

> I have just updated to the latest svn revision, and it seems you
> forgot to #include cpplib.h and langhooks.h.

Done. Committed revision 176577 of the MELT branch.

Thanks for spotting my mistake.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-21 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-21  8:44 [Melt] Add some includes to melt-run.proto.h Romain Geissler
2011-07-21  9:40 ` Basile Starynkevitch
2011-07-21 11:12   ` Romain Geissler
2011-07-21 15:40     ` Romain Geissler
2011-07-21 16:10       ` Basile Starynkevitch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).