public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Phani Pavan <phani@coolindian.com>
To: gcc-help@gcc.gnu.org
Subject: Help Required
Date: Fri, 06 Jun 2003 04:37:00 -0000	[thread overview]
Message-ID: <20030606043633.587B7428E@sitemail.everyone.net> (raw)

We are trying to develop a tool to check the code by reading the compiler trees generated from gcc. While parsing through the trees, we found the following issues. Please suggest us, if there is any utility, which gives us the data that directly reflect the user code with out doing any optimization or processing of the user code. 

1. const is coming only for variables in form of read_only_flag. With this we are only able to identify read only variables. But we are not able to identify pointers that are pointing to constant data like "const char *p."
2. "Implicit data types could not be found Ex: var = 7; This var is implicitly treated as a integer variable."
3. "Repeated data definitions cannot be found. They will be overWritten.
	int a;
	int a=8;
The second declaration has an initializer, so it ignores the previous declaration.
4. For a conditional statement like (i>0)? i:-i is treated as a abs_expr (Absolute Expression) instead of an conditional expression.
5. If there is an else statement with a NULL body, then it will be ignored.
6. There is no differentiation done between extern declaration and a forward declaration for a function.
7. For an inline function declaration, the inline information for the function is missing in the tree.
8. While iterating multiple input file, with top_lev_main, it is failing inside stor-layout.c
9. The function declaration comes as default at the definition, even if there is no declaration for the function.
10. If the function definition follows a function declaration, then the declaration is getting overwritten by the definition.
11. Sometimes in function declaration, a void member is padded at the end of the function argument list.
12. If the function takes in variable number of parameters ( … ), this information is missing in the trees.
13. For function declarations, the argument name information is missing.
14. "In a Compound expression, if there are multiple expressions, only the first and last expressions are considered for adding in the tree, as the compund expression can have only two arguments like (a+2, b+3, a+b+c): Will be taken as (a+2, a+b+c)"
15. "Size of construct: If there is a structure type definition inside a type declaration like struct, 
struct abc_
{
    struct
    {
        int a;
        int b;
    }
    int a;
};
In this case the unit size of the record type includes the size of the structure definition even though there is no member defined for the internal structure. This case gives a difference in size when we attain through sizeof() operation."
16. "in-built functions can not be traced as the tree is constructed using the information. The sizeof construct is replaced by its value in the tree."
17. The enumeration Constants are replaced by their values in the tree.
18. Tree information in a long variable ( for ex if a function call is made func(20l) it is not possible to recognize these situations.)
19. "All the implicit conditional statements are expanded in the tree. If ( i )  => if ( i != 0 )"
20. An expression like w < 20 will be treated as w <= 19
21. Implicit  cast and explicit cast of data types could not be differentiated.
22. Prefix and postfix ( ++, -- ) are optimized in iterative statement, in which they are swapped.
23. All the constant expressions are evaluated in the tree.
24. "Compound assignment operators are expanded to simple operators. a>>=b is expanded to a = a >> b;"

Thanks in advance,
Phani

_____________________________________________________________
Hate Junk Email?  Ebook helps you stop it - http://BlockJunkEmail.com

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag

             reply	other threads:[~2003-06-06  4:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-06  4:37 Phani Pavan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-04-18  8:14 Help required sonal
2013-04-18 10:09 ` Chung-Ju Wu
2003-09-29  4:52 help required josephine
2002-05-11  8:13 Help Required Shalendra  Chhabra
2002-05-11  8:24 ` Alexandre Courbot
     [not found] <616BE6A276E3714788D2AC35C40CD18D621D2A@whale.softwire.co.uk>
2002-05-10  7:05 ` Help required Rupert Wood
2002-05-10  6:33 Shalendra  Chhabra
2002-03-07  3:57 Navin K Sinha
2000-04-10 17:23 Help Required Sharma, SumanX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030606043633.587B7428E@sitemail.everyone.net \
    --to=phani@coolindian.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).