Re: [RFC] c++: parser - Support for target address spaces in C++

2022-10-06 Thread Paul Iannetta via Gcc
ort for target > > address spaces in C++. The basic idea is only to make the parser > > recognize address spaces, and lower them into GIMPLE, in the same > > fashion as the C parser. This also makes it possible to merge the > > function `c_register_addr_space` in one pl

Re: [RFC] c++: parser - Support for target address spaces in C++

2022-10-06 Thread Andrew Pinski via Gcc
paces, and lower them into GIMPLE, in the same > fashion as the C parser. This also makes it possible to merge the > function `c_register_addr_space` in one place which is better than > before. > > The patch still has some drawbacks compared to its C counterpart. > Namely, much like t

[RFC] c++: parser - Support for target address spaces in C++

2022-10-06 Thread Paul Iannetta via Gcc
both for C and C++. Here is a first attempt at a patch to enable the support for target address spaces in C++. The basic idea is only to make the parser recognize address spaces, and lower them into GIMPLE, in the same fashion as the C parser. This also makes it possible to merge th

Re: Question on path from C parser to DECL_INITIAL

2022-03-23 Thread Martin Jambor
Hi, On Wed, Mar 23 2022, Erick Ochoa via Gcc wrote: > Hi, > > I am trying to understand what path is executed in GCC from parsing a C > expression (in a global variable declaration) to the value in DECL_INITIAL. > At the moment, I have annotated a tree during parsing. I have another > debugging pa

Re: Question on path from C parser to DECL_INITIAL

2022-03-23 Thread Erick Ochoa via Gcc
> I'm not sure I understand but no pass walks 'global variables', so you're > not > going to "see" the annotation from passes (whatever that means). > > What I mean by walking global variables is that I have a GIMPLE_PASS that ignores the function sent as an argument and instead just uses a FOR_EAC

Re: Question on path from C parser to DECL_INITIAL

2022-03-23 Thread Richard Biener via Gcc
On Wed, Mar 23, 2022 at 12:55 PM Erick Ochoa via Gcc wrote: > > Hi, > > I am trying to understand what path is executed in GCC from parsing a C > expression (in a global variable declaration) to the value in DECL_INITIAL. > At the moment, I have annotated a tree during parsing. I have another > de

Question on path from C parser to DECL_INITIAL

2022-03-23 Thread Erick Ochoa via Gcc
Hi, I am trying to understand what path is executed in GCC from parsing a C expression (in a global variable declaration) to the value in DECL_INITIAL. At the moment, I have annotated a tree during parsing. I have another debugging pass that looks for this tree in subsequent passes. The annotation

Re: Clarification on who can approve Objective-C/Objective-C++ parser patches

2010-09-29 Thread Nicola Pero
u.org" Subject: Re: Clarification on who can approve Objective-C/Objective-C++ parser patches On Thu, 23 Sep 2010, Nicola Pero wrote: > For example, if I post a patch that changes a piece of code in > gcc/c-parser.c which is only ever used if (c_dialect_objc ()), then I > a

Re: Clarification on who can approve Objective-C/Objective-C++ parser patches

2010-09-23 Thread Nicola Pero
>> For example, if I post a patch that changes a piece of code in >> gcc/c-parser.c which is only ever used if (c_dialect_objc ()), then I >> assume that it is part of the Objective-C front-end, and the >> Objective-C/Objective-C++ maintainers are in charge of approving it. >> Once they appro

Re: Clarification on who can approve Objective-C/Objective-C++ parser patches

2010-09-23 Thread Joseph S. Myers
On Thu, 23 Sep 2010, Nicola Pero wrote: > For example, if I post a patch that changes a piece of code in > gcc/c-parser.c which is only ever used if (c_dialect_objc ()), then I > assume that it is part of the Objective-C front-end, and the > Objective-C/Objective-C++ maintainers are in charge o

Clarification on who can approve Objective-C/Objective-C++ parser patches

2010-09-23 Thread Nicola Pero
Most of the Objective-C/Objective-C++ parser code is in files shared with the C/C++ frontend, hence I'm confused about who approves what. For example, if I post a patch that changes a piece of code in gcc/c-parser.c which is only ever used if (c_dialect_objc ()), then I assume that it is

Re: C parser modification & questions

2010-01-19 Thread Basile STARYNKEVITCH
Nikola Ikonic wrote: Hello, I am working on a modification of C parser and I need some help since I am having difficulties understanding some issues (I am complete newbie on GCC). Long story short, I am trying to add a new attribute to function types (similar to "inline", for examp

C parser modification & questions

2010-01-19 Thread Nikola Ikonic
Hello, I am working on a modification of C parser and I need some help since I am having difficulties understanding some issues (I am complete newbie on GCC). Long story short, I am trying to add a new attribute to function types (similar to "inline", for example). Let's say that t

Re: C Parser

2007-01-18 Thread Robert Dewar
Ian Lance Taylor wrote: I'm sure Joseph could explain the reasons better, but some of the problems with the bison parser were 1) it's hard to generate good error messages at the right places; 2) C is not LALR(1) (at least, not in a natural sense) because of the declaration syntax; 3) it made it

Re: C Parser

2007-01-18 Thread Ian Lance Taylor
"Paulo J. Matos" <[EMAIL PROTECTED]> writes: > I was quite surprised to see that the C Parser was manually > implemented and you didn't use any parser generator. > > I would be curious regarding this decision. I would think the > development of a C parser wo

Re: C Parser

2007-01-18 Thread Lee Millward
On 1/18/07, Paulo J. Matos <[EMAIL PROTECTED]> wrote: Hi all, I was quite surprised to see that the C Parser was manually implemented and you didn't use any parser generator. I would be curious regarding this decision. I would think the development of a C parser would b

Re: C Parser

2007-01-18 Thread Ferad Zyulkyarov
ulo J. Matos <[EMAIL PROTECTED]> wrote: Hi all, I was quite surprised to see that the C Parser was manually implemented and you didn't use any parser generator. I would be curious regarding this decision. I would think the development of a C parser would be an almost unsurmountable task an

C Parser

2007-01-18 Thread Paulo J. Matos
Hi all, I was quite surprised to see that the C Parser was manually implemented and you didn't use any parser generator. I would be curious regarding this decision. I would think the development of a C parser would be an almost unsurmountable task and not very logic given the parser gener

Re: C++ parser: Should we get rid of cp_parser_declarator_id?

2005-12-07 Thread Mark Mitchell
Volker Reichelt wrote: > Shouldn't we fold cp_parser_declarator_id into the caller and call > cp_parser_id_expression directly? Originally, I was trying to have a function for each non-terminal. I'm not going to be dogmatic about that, but is there a good reason to remove the function? As Gaby

Re: C++ parser: Should we get rid of cp_parser_declarator_id?

2005-12-07 Thread Volker Reichelt
On 7 Dec, Nathan Sidwell wrote: > Gabriel Dos Reis wrote: > >> If we make it "static inline", would not we gain the same efficiency >> and preserve the comments and all that? In general, the methodoly >> seems to have a function for each non-terminal -- following a long >> tradition of recursive

Re: C++ parser: Should we get rid of cp_parser_declarator_id?

2005-12-07 Thread Nathan Sidwell
Gabriel Dos Reis wrote: If we make it "static inline", would not we gain the same efficiency and preserve the comments and all that? In general, the methodoly seems to have a function for each non-terminal -- following a long tradition of recursive descent parser -- and maintaining that princip

Re: C++ parser: Should we get rid of cp_parser_declarator_id?

2005-12-06 Thread Gabriel Dos Reis
Volker Reichelt <[EMAIL PROTECTED]> writes: | The C++ parser contains the static function | cp_parser_declarator_id (cp_parser* parser) | which consists of a lot of comments and a single statement | | return cp_parser_id_expression (

C++ parser: Should we get rid of cp_parser_declarator_id?

2005-12-06 Thread Volker Reichelt
The C++ parser contains the static function cp_parser_declarator_id (cp_parser* parser) which consists of a lot of comments and a single statement return cp_parser_id_expression (parser, /*template_keyword_p=*/false

Re: Separating c++ parser

2005-09-12 Thread Diego Novillo
On 09/12/05 15:55, Ashwin Bharambe wrote: - stop gcc once the cp frontend parses the code and generates the parse tree structure. Check -fsyntax-only. - disable the stage1,stage2 compilation etc. during the build process? just do 'make all' instead of 'make bootstrap'.

Re: Separating c++ parser

2005-09-12 Thread Karel Gardas
On Mon, 12 Sep 2005, Ashwin Bharambe wrote: - disable the stage1,stage2 compilation etc. during the build process? IIRC cross-compilers do not use stage1/2/3 as it is not possible to execute produced target binary on the host platform. And for compiling cross-compiler simple `make' is used.

Re: Separating c++ parser

2005-09-12 Thread Fariborz Jahanian
You can start off by looking into how -fsyntax-only option is implemented. - fariborz On Sep 12, 2005, at 12:55 PM, Ashwin Bharambe wrote: Hmm. Ok fine, I can live with having to keep all extraneous code lying around. But it seems like there must be a way to: - stop gcc once the cp front

Re: Separating c++ parser

2005-09-12 Thread Ashwin Bharambe
Hmm. Ok fine, I can live with having to keep all extraneous code lying around. But it seems like there must be a way to: - stop gcc once the cp frontend parses the code and generates the parse tree structure. - disable the stage1,stage2 compilation etc. during the build process? Or, is there s

Re: Separating c++ parser

2005-09-12 Thread Diego Novillo
On 09/12/05 15:30, Ashwin Bharambe wrote: is it possible to plug out the parser and intermediate representation code (presumably only in the front-end?) relatively easily? Not really. Though we have been re-designing the internal architecture to be more modular, all the components are meant

Separating c++ parser

2005-09-12 Thread Ashwin Bharambe
Hi all, I intend to use gcc's C++ parser and the intermediate representation it creates for use in source browsing, etc. I have a few questions regarding this: firstly, is it possible to plug out the parser and intermediate representation code (presumably only in the front-end?) relatively e

Error repair in the C++ parser

2005-07-27 Thread Ziemowit Laski
I'm fixing a problem with ObjC++ going beserk upon encountering a syntax error, specifically not finding a '{' at the beginning of a method definition. Is there a safe, established way of repairing the token stream, i.e., inserting the '{' at that point? That way, I could print an ObjC++-specific

Re: New C parser to be committed

2005-02-25 Thread Joseph S. Myers
Now committed to mainline. Bootstrapped with no regressions today on the listed platforms of x86_64-unknown-linux-gnu, powerpc64-unknown-linux-gnu and ia64-hp-hpux11.23. -- Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/ [EMAIL PROTECTED] (personal mail) [EMAIL PROTE

Re: New C parser to be committed

2005-02-25 Thread Marcin Dalecki
On 2005-02-25, at 12:22, Joseph S. Myers wrote: I intend to commit my new C parser to mainline today once it is confirmed that the 4.0 branch has been created and after final testing against today's mainline on x86_64-unknown-linux-gnu, powerpc64-unknown-linux-gnu and ia64-hp-hpux11.23.

Re: New C parser to be committed

2005-02-25 Thread Steven Bosscher
On Feb 25, 2005 12:22 PM, Joseph S. Myers <[EMAIL PROTECTED]> wrote: > I intend to commit my new C parser to mainline today once it is confirmed > that the 4.0 branch has been created and after final testing against > today's mainline on x86_64-unknown-linux-gnu, powerpc

Re: New C parser to be committed

2005-02-25 Thread Rogelio M . Serrano Jr .
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2005-02-25 20:54:22 +0800 Lars Segerlund <[EMAIL PROTECTED]> wrote: btw. what Wiki ?? / Lars Segerlund http://gcc.gnu.org/wiki - -- Got Sharapova? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using the GPG bundle for GNUMa

Re: New C parser to be committed

2005-02-25 Thread Andrew Pinski
On Feb 25, 2005, at 7:54 AM, Lars Segerlund wrote: btw. what Wiki ?? http://gcc.gnu.org/wiki/ -- Pinski

Re: New C parser to be committed

2005-02-25 Thread Lars Segerlund
btw. what Wiki ?? / Lars Segerlund On Fri, 25 Feb 2005 11:22:11 + (UTC) "Joseph S. Myers" <[EMAIL PROTECTED]> wrote: > I intend to commit my new C parser to mainline today once it is confirmed > that the 4.0 branch has been created and after final testing against

Re: New C parser to be committed

2005-02-25 Thread Rogelio M . Serrano Jr .
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2005-02-25 19:22:11 +0800 Joseph S. Myers <[EMAIL PROTECTED]> wrote: I intend to commit my new C parser to mainline today once it is confirmed that the 4.0 branch has been created and after final testing against today's mainlin

New C parser to be committed

2005-02-25 Thread Joseph S. Myers
I intend to commit my new C parser to mainline today once it is confirmed that the 4.0 branch has been created and after final testing against today's mainline on x86_64-unknown-linux-gnu, powerpc64-unknown-linux-gnu and ia64-hp-hpux11.23. The version to be committed is version 8