public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc-in-cxx branch created
@ 2008-06-18  6:17 Ian Lance Taylor
  2008-06-18 16:13 ` Diego Novillo
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2008-06-18  6:17 UTC (permalink / raw)
  To: gcc; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

As I promised at the summit today, I have created the branch
gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was
better to avoid possible meta-characters).  The goal of this branch is
to develop a version of gcc which is compiled with C++.  Here are my
presentation slides in PDF format: http://airs.com/ian/cxx-slides.pdf .

I have not yet committed any patches to the branch--at present it is
just a copy of the trunk.  I will start committing patches soon, and
anybody else may submit patches as well.  The branch will follow the
usual gcc maintainership rules, except that any non-algorithmic
maintainer may additionally approve or commit patches which permit
compilation with C++.

I have committed the appended patch to htdocs/svn.html.

Ian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Document gcc-in-cxx branch --]
[-- Type: text/x-patch, Size: 868 bytes --]

Index: svn.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/svn.html,v
retrieving revision 1.86
diff -u -r1.86 svn.html
--- svn.html	12 Jun 2008 14:22:37 -0000	1.86
+++ svn.html	18 Jun 2008 06:00:13 -0000
@@ -410,6 +410,14 @@
   <code>[function-specific]</code> in the subject line.
   The branch is maintained by Michael Meissner.</dd>
 
+  <dt>gcc-in-cxx</dt>
+  <dd>This branch is for converting gcc to be written in C++.  Patches
+  should be marked with the tag <code>[gcc-in-cxx]</code> in the
+  subject line.  This branch operates under the general gcc
+  maintainership rules, except that any non-algorithmic maintainer is
+  additionally permitted to approve changes which permit compilation
+  with C++.  The branch is maintained by Ian Lance Taylor.</dd>
+
 </dl>
 
 <h4>Architecture-specific</h4>

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

* Re: gcc-in-cxx branch created
  2008-06-18  6:17 gcc-in-cxx branch created Ian Lance Taylor
@ 2008-06-18 16:13 ` Diego Novillo
  2008-06-19 11:00 ` Gabriel Dos Reis
  2008-06-21 11:00 ` Ivan Levashew
  2 siblings, 0 replies; 7+ messages in thread
From: Diego Novillo @ 2008-06-18 16:13 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc, gcc-patches

On 6/18/08 2:01 AM, Ian Lance Taylor wrote:
> As I promised at the summit today, I have created the branch
> gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was
> better to avoid possible meta-characters).  The goal of this branch is
> to develop a version of gcc which is compiled with C++.  Here are my
> presentation slides in PDF format: http://airs.com/ian/cxx-slides.pdf .

Will this evolve into a branch to switch GCC's implementation language 
to C++.  Or are you thinking about a separate branch for this?


Diego.

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

* Re: gcc-in-cxx branch created
  2008-06-18  6:17 gcc-in-cxx branch created Ian Lance Taylor
  2008-06-18 16:13 ` Diego Novillo
@ 2008-06-19 11:00 ` Gabriel Dos Reis
  2008-06-19 12:33   ` Ian Lance Taylor
  2008-06-21 11:00 ` Ivan Levashew
  2 siblings, 1 reply; 7+ messages in thread
From: Gabriel Dos Reis @ 2008-06-19 11:00 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc, gcc-patches

On Wed, Jun 18, 2008 at 1:01 AM, Ian Lance Taylor <iant@google.com> wrote:
> As I promised at the summit today, I have created the branch
> gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was
> better to avoid possible meta-characters).  The goal of this branch is
> to develop a version of gcc which is compiled with C++.  Here are my
> presentation slides in PDF format: http://airs.com/ian/cxx-slides.pdf .

Excellent slides.  Many thanks for doing this.

>
> I have not yet committed any patches to the branch--at present it is
> just a copy of the trunk.  I will start committing patches soon, and
> anybody else may submit patches as well.  The branch will follow the
> usual gcc maintainership rules, except that any non-algorithmic
> maintainer may additionally approve or commit patches which permit
> compilation with C++.

I have a question:  I suspect that in concreteness you would prefer declarations
in GCC headers have a C++ linkage, as opposed to C linkage -- except where
for interoperability  with common runtime systems, we want the
declarations to have
C linkage (e.g. in libgcc for example).  Am I correct?
The reason I'm asking is that a fresh build o gcc-in-cxx dies on my machine with
complains that `program' has conflicting declarations: once in
libcpp.h as having
C++ linkage, once in toplev.h with a C declaration.  It is the
tradition in modern
C++ to avoid having many `sources' for the same declaration.

-- Gaby

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

* Re: gcc-in-cxx branch created
  2008-06-19 11:00 ` Gabriel Dos Reis
@ 2008-06-19 12:33   ` Ian Lance Taylor
  2008-06-19 13:05     ` Gabriel Dos Reis
  2008-06-19 13:16     ` Joseph S. Myers
  0 siblings, 2 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2008-06-19 12:33 UTC (permalink / raw)
  To: Gabriel Dos Reis; +Cc: gcc, gcc-patches

[ Dropping gcc-patches. ]

"Gabriel Dos Reis" <gdr@integrable-solutions.net> writes:

>> I have not yet committed any patches to the branch--at present it is
>> just a copy of the trunk.  I will start committing patches soon, and
>> anybody else may submit patches as well.  The branch will follow the
>> usual gcc maintainership rules, except that any non-algorithmic
>> maintainer may additionally approve or commit patches which permit
>> compilation with C++.
>
> I have a question:  I suspect that in concreteness you would prefer declarations
> in GCC headers have a C++ linkage, as opposed to C linkage -- except where
> for interoperability  with common runtime systems, we want the
> declarations to have
> C linkage (e.g. in libgcc for example).  Am I correct?

Yes, I think that makes the most sense.

> The reason I'm asking is that a fresh build o gcc-in-cxx dies on my machine with
> complains that `program' has conflicting declarations: once in
> libcpp.h as having
> C++ linkage, once in toplev.h with a C declaration.  It is the
> tradition in modern
> C++ to avoid having many `sources' for the same declaration.

Yes.  I'm working around that for now by editing toplev.h, to avoid
pushing libcpp and libiberty to C++ right away.

#ifdef __cplusplus
extern "C" {
#endif

/* This is used by cpplib and libiberty.  */
extern const char *progname;

#ifdef __cplusplus
}
#endif


I'll try to get my current set of patches committed to the branch
later today.

Ian

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

* Re: gcc-in-cxx branch created
  2008-06-19 12:33   ` Ian Lance Taylor
@ 2008-06-19 13:05     ` Gabriel Dos Reis
  2008-06-19 13:16     ` Joseph S. Myers
  1 sibling, 0 replies; 7+ messages in thread
From: Gabriel Dos Reis @ 2008-06-19 13:05 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc, gcc-patches

On Thu, Jun 19, 2008 at 7:24 AM, Ian Lance Taylor <iant@google.com> wrote:

>> The reason I'm asking is that a fresh build o gcc-in-cxx dies on my machine with
>> complains that `program' has conflicting declarations: once in
>> libcpp.h as having
>> C++ linkage, once in toplev.h with a C declaration.  It is the
>> tradition in modern
>> C++ to avoid having many `sources' for the same declaration.
>
> Yes.  I'm working around that for now by editing toplev.h, to avoid
> pushing libcpp and libiberty to C++ right away.
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> /* This is used by cpplib and libiberty.  */
> extern const char *progname;
>
> #ifdef __cplusplus
> }
> #endif

Yes that makes sense.

>
>
> I'll try to get my current set of patches committed to the branch
> later today.

I'll wait until your patches are in.
Thanks!

-- Gaby

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

* Re: gcc-in-cxx branch created
  2008-06-19 12:33   ` Ian Lance Taylor
  2008-06-19 13:05     ` Gabriel Dos Reis
@ 2008-06-19 13:16     ` Joseph S. Myers
  1 sibling, 0 replies; 7+ messages in thread
From: Joseph S. Myers @ 2008-06-19 13:16 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Gabriel Dos Reis, gcc, gcc-patches

On Thu, 19 Jun 2008, Ian Lance Taylor wrote:

> Yes.  I'm working around that for now by editing toplev.h, to avoid
> pushing libcpp and libiberty to C++ right away.

I'm not convinced there's much value in building libiberty as C++ for GCC, 
given that it needs to remain buildable as C for now for the other 
projects using it and those projects may be built along with GCC in a 
combined tree (so sharing a single build of libiberty for the host).  
Much the same applies to libdecnumber, shared with GDB (and externally 
maintained).  (I can however see the potential use of a library of C++ 
infrastructure shared between any C++ host tools in GCC and src, but think 
that would best be kept separate from libiberty.  Much of libiberty could 
probably do with being replaced by, or merged into, gnulib anyway.)

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: gcc-in-cxx branch created
  2008-06-18  6:17 gcc-in-cxx branch created Ian Lance Taylor
  2008-06-18 16:13 ` Diego Novillo
  2008-06-19 11:00 ` Gabriel Dos Reis
@ 2008-06-21 11:00 ` Ivan Levashew
  2 siblings, 0 replies; 7+ messages in thread
From: Ivan Levashew @ 2008-06-21 11:00 UTC (permalink / raw)
  To: gcc-patches; +Cc: gcc

Ian Lance Taylor ГЇГЁГёГҐГІ:
> As I promised at the summit today, I have created the branch
> gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was
> better to avoid possible meta-characters).  The goal of this branch is
> to develop a version of gcc which is compiled with C++.  Here are my
> presentation slides in PDF format: http://airs.com/ian/cxx-slides.pdf .
> 
Well, C's macros are ugly, but C++ isn't a way to go either. The fact 
that C++ is partially implemented in GCC and belongs to the GCC main 
distribution is the only excuse for choosing C++.


-- 
If you want to get to the top, you have to start at the bottom

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

end of thread, other threads:[~2008-06-21  9:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-18  6:17 gcc-in-cxx branch created Ian Lance Taylor
2008-06-18 16:13 ` Diego Novillo
2008-06-19 11:00 ` Gabriel Dos Reis
2008-06-19 12:33   ` Ian Lance Taylor
2008-06-19 13:05     ` Gabriel Dos Reis
2008-06-19 13:16     ` Joseph S. Myers
2008-06-21 11:00 ` Ivan Levashew

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).