public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Help required
@ 2013-04-18  8:14 sonal
  2013-04-18 10:09 ` Chung-Ju Wu
  0 siblings, 1 reply; 10+ messages in thread
From: sonal @ 2013-04-18  8:14 UTC (permalink / raw)
  To: gcc-help

Sir,
If you can tell me which file to include for "file system"
I am getting  errors:
Undeclared identifier FILE
Undeclared identifier fp

-- 
Thanks and regards
Sonal Rautela
E1-SAE Traction
BHEL-EDN

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

* Re: Help required
  2013-04-18  8:14 Help required sonal
@ 2013-04-18 10:09 ` Chung-Ju Wu
  0 siblings, 0 replies; 10+ messages in thread
From: Chung-Ju Wu @ 2013-04-18 10:09 UTC (permalink / raw)
  To: sonal; +Cc: gcc

2013/4/18 sonal <sonalr@bheledn.co.in>:
> Sir,
> If you can tell me which file to include for "file system"
> I am getting  errors:
> Undeclared identifier FILE
> Undeclared identifier fp
>
> --

#include <stdio.h>


Best regards,
jasonwucj

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

* help required
@ 2003-09-29  4:52 josephine
  0 siblings, 0 replies; 10+ messages in thread
From: josephine @ 2003-09-29  4:52 UTC (permalink / raw)
  To: gcc-help; +Cc: josephine

 Hello Madam/Sir,

I came across this problem on using gcc-3.2.2 on hp-ux 11 platform

I am not able to build binary on hp-ux.

On using command line options in script and executing the script using ant.

came across the following error

[exec] ../lib/x_yacc.c: In function `x_yyparse':
      [exec] ../lib/x_yacc.c:36808: Internal compiler error in
output_cbranch, at config/pa/pa.c:5303
      [exec] Please submit a full bug report,
      [exec] with preprocessed source if appropriate.
      [exec] See <URL:http://www.gnu.org/software/gcc/bugs.html>
for instructions.

options used  in the script are as follows

usr/local/gcc-3.2.2/bin/gcc -g -s -fPIC -D_MYPOSIX_ -DHPUX
-DSEMANTIC_CHECK -DUNIX   -I./../../inc -I/opt/java1.4/include/
-I/opt/java1.4/include/hp-ux
-I/usr/local/gcc-3.2.2/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2.2/include
-O2 -ffunction-sections  -L/usr/lib  -o ./../../bin/exec
./../lib/create_tad.c ./../lib/export_x_data.c
./../lib/free_storage.c ./../lib/free_tad_storage.c
./../lib/progress_module.c ./../lib/resolve_signal_exprs.c
./../lib/semantic_checks.c ./../lib/stack_routines.c
./../lib/x_lex.c ./../lib/x_main.c ./../lib/x_utils.c
./../lib/x_yacc.c ./../lib/storage.c ./../lib/tad_storage.c
jni_dummy_routines.c main.c -lrpcsoc -lnsl -lpthread -lc


Kindly help me resolve this issue

Thanks and Regards,

VJ 

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

* Help Required
@ 2003-06-06  4:37 Phani Pavan
  0 siblings, 0 replies; 10+ messages in thread
From: Phani Pavan @ 2003-06-06  4:37 UTC (permalink / raw)
  To: gcc-help

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

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

* Re: Help Required
  2002-05-11  8:13 Shalendra  Chhabra
@ 2002-05-11  8:24 ` Alexandre Courbot
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Courbot @ 2002-05-11  8:24 UTC (permalink / raw)
  To: Shalendra Chhabra; +Cc: gcc-help

> I am sorry I am not able to debug these errors as I am facing 
> these for the first time and also I have a little experience with 
> Programing, When I compile a code from
> demo files of Openssl,
> cli.cpp
> I get the following errors

What is your compilation line? Obviously you forgot to link to the
openssl library. Adding -lssl to the end of your compilation line should
help. This flag will tell the linker to link with the ssl library.
Whenever you use a library, you have to link to it.

> 2. It would be of great help if someone can tell me a link where I 
> can learn how to write applications using Openssl Library.

There must be some good documentation with the openssl package. Else,
searching "openssl tutorial" or something like this on www.google.com
should give you good results.

Alex.
-- 
http://www.gnurou.org

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

* Help Required
@ 2002-05-11  8:13 Shalendra  Chhabra
  2002-05-11  8:24 ` Alexandre Courbot
  0 siblings, 1 reply; 10+ messages in thread
From: Shalendra  Chhabra @ 2002-05-11  8:13 UTC (permalink / raw)
  To: gcc-help

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

I am sorry I am not able to debug these errors as I am facing 
these for the first time and also I have a little experience with 
Programing, When I compile a code from
demo files of Openssl,
cli.cpp
I get the following errors

/tmp/ccgN1DUz.o: In function `main':
/tmp/ccgN1DUz.o(.text+0xa): undefined reference to 
`SSL_library_init'
/tmp/ccgN1DUz.o(.text+0xf): undefined reference to 
`SSLv2_client_method'
/tmp/ccgN1DUz.o(.text+0x1c): undefined reference to 
`SSL_load_error_strings'
/tmp/ccgN1DUz.o(.text+0x2b): undefined reference to 
`SSL_CTX_new'
/tmp/ccgN1DUz.o(.text+0x60): undefined reference to 
`ERR_print_errors_fp'
/tmp/ccgN1DUz.o(.text+0x139): undefined reference to `SSL_new'
/tmp/ccgN1DUz.o(.text+0x164): undefined reference to 
`SSL_set_fd'
/tmp/ccgN1DUz.o(.text+0x173): undefined reference to 
`SSL_connect'
/tmp/ccgN1DUz.o(.text+0x18f): undefined reference to 
`ERR_print_errors_fp'
/tmp/ccgN1DUz.o(.text+0x1b1): undefined reference to 
`SSL_get_current_cipher'
/tmp/ccgN1DUz.o(.text+0x1bc): undefined reference to 
`SSL_CIPHER_get_name'
/tmp/ccgN1DUz.o(.text+0x1f3): undefined reference to `SSL_write'
/tmp/ccgN1DUz.o(.text+0x20f): undefined reference to 
`ERR_print_errors_fp'
/tmp/ccgN1DUz.o(.text+0x237): undefined reference to `SSL_read'
/tmp/ccgN1DUz.o(.text+0x253): undefined reference to 
`ERR_print_errors_fp'
/tmp/ccgN1DUz.o(.text+0x297): undefined reference to 
`SSL_shutdown'
/tmp/ccgN1DUz.o(.text+0x2b5): undefined reference to `SSL_free'
/tmp/ccgN1DUz.o(.text+0x2c4): undefined reference to 
`SSL_CTX_free'
collect2: ld returned 1 exit status

The code is here as an attachment. I would be grateful if someone 
helps me, I still have problem with serv.cpp and inetdserv.cpp but 
I will try to debug them myself.

2. It would be of great help if someone can tell me a link where I 
can learn how to write applications using Openssl Library.

Thank You very much,
Yours Sincerely
Shalendra (Student)
_________________________________________________________
Click below to visit monsterindia.com and review jobs in India or 
Abroad
http://monsterindia.rediff.com/jobs

[-- Attachment #2: cli.cpp --]
[-- Type: application/octet-stream, Size: 2482 bytes --]

/* cli.cpp  -  Minimal ssleay client for Unix
   30.9.1996, Sampo Kellomaki <sampo@iki.fi> */

/* mangled to work with SSLeay-0.9.0b and OpenSSL 0.9.2b
   Simplified to be even more minimal
   12/98 - 4/99 Wade Scholine <wades@mail.cybg.com> */

#include <stdio.h>
#include <memory.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

#include <openssl/crypto.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
# include <unistd.h>

#define CHK_NULL(x) if ((x)==NULL) exit (1)
#define CHK_ERR(err,s) if ((err)==-1) { perror(s); exit(1); }
#define CHK_SSL(err) if ((err)==-1) { ERR_print_errors_fp(stderr); exit(2); }

void main ()
{
  int err;
  int sd;
  struct sockaddr_in sa;
  SSL_CTX* ctx;
  SSL*     ssl;
  X509*    server_cert;
  char*    str;
  char     buf [4096];
  SSL_METHOD *meth;

  SSLeay_add_ssl_algorithms();
  meth = SSLv2_client_method();
  SSL_load_error_strings();
  ctx = SSL_CTX_new (meth);                        CHK_NULL(ctx);

  CHK_SSL(err);
  
  /* ----------------------------------------------- */
  /* Create a socket and connect to server using normal socket calls. */
  
  sd = socket (AF_INET, SOCK_STREAM, 0);       CHK_ERR(sd, "socket");
 
  memset (&sa, '\0', sizeof(sa));
  sa.sin_family      = AF_INET;
  sa.sin_addr.s_addr = inet_addr ("127.0.0.1");   /* Server IP */
  sa.sin_port        = htons     (1111);          /* Server Port number */
  
  err = connect(sd, (struct sockaddr*) &sa,
		sizeof(sa));                   CHK_ERR(err, "connect");

 


  /* Now we have TCP conncetion. Start SSL negotiation. */
  
  ssl = SSL_new (ctx);                         CHK_NULL(ssl);    
  SSL_set_fd (ssl, sd);
  err = SSL_connect (ssl);                     CHK_SSL(err);
    
  /* Following two steps are optional and not required for
     data exchange to be successful. */
  
  /* Get the cipher - opt */

  printf ("SSL connection using %s\n", SSL_get_cipher (ssl));
  
  /* DATA EXCHANGE - Send a message and receive a reply. */

  err = SSL_write (ssl, "Hello World!", strlen("Hello World!"));  CHK_SSL(err);
  
  err = SSL_read (ssl, buf, sizeof(buf) - 1);                     CHK_SSL(err);
  buf[err] = '\0';
  printf ("Got %d chars:'%s'\n", err, buf);
  SSL_shutdown (ssl);  /* send SSL/TLS close_notify */

  /* Clean up. */

  close (sd);
  SSL_free (ssl);
  SSL_CTX_free (ctx);
}
/* EOF - cli.cpp */

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

* RE: Help required
       [not found] <616BE6A276E3714788D2AC35C40CD18D621D2A@whale.softwire.co.uk>
@ 2002-05-10  7:05 ` Rupert Wood
  0 siblings, 0 replies; 10+ messages in thread
From: Rupert Wood @ 2002-05-10  7:05 UTC (permalink / raw)
  To: 'Shalendra  Chhabra'; +Cc: gcc-help

Shalendra Chhabra wrote:

> pro1.cpp:31: implicit declaration of function `int 
> CHK_NULL(...)'
> pro1.cpp:33: implicit declaration of function `int CHK_SSL(...)'
> pro1.cpp:38: implicit declaration of function `int CHK_ERR(...)'
> pro1.cpp:96: implicit declaration of function `int close(...)

This means that you haven't #defined these macros or included the header
files which declares close().

It looks like you've copied this code out of one of the ssl demo files;
you can find definitions of the CHK_SSL/NULL/ETC at the top of cli.cpp,
inetdsrv.cpp or serv.cpp (just above the main function). You should copy
these lines into your program after the openssl includes but before
main(). You should also try and understand what they do rather than just
use them blind!

If you type 'man close' on your system then it should tell you which
header file to include for the definition of close() (probably
unistd.h).

Good luck,
Rup.

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

* Help required
@ 2002-05-10  6:33 Shalendra  Chhabra
  0 siblings, 0 replies; 10+ messages in thread
From: Shalendra  Chhabra @ 2002-05-10  6:33 UTC (permalink / raw)
  To: gcc-help

I need to write some application using SSL. For that I have a code 
which first opens a socket and does something..something but even 
in this simple program its giving me errors like this
pro1.cpp:31: implicit declaration of function `int 
CHK_NULL(...)'
pro1.cpp:33: implicit declaration of function `int CHK_SSL(...)'
pro1.cpp:38: implicit declaration of function `int CHK_ERR(...)'
pro1.cpp:96: implicit declaration of function `int close(...)

what does this mean????
Hereis the code pro1.cpp

#include <stdio.h>
#include <memory.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

#include <openssl/crypto.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
void main ()
{
   int err;
   int sd;
   struct sockaddr_in sa;
   SSL_CTX* ctx;
   SSL*     ssl;
   X509*    server_cert;
   char*    str;
   char     buf [4096];
   SSL_METHOD *meth;

   SSLeay_add_ssl_algorithms();
   meth = SSLv2_client_method();
   SSL_load_error_strings();
   ctx = SSL_CTX_new (meth);                        
CHK_NULL(ctx);

   CHK_SSL(err);

   /* ----------------------------------------------- */
   /* Create a socket and connect to server using normal socket 
calls. */

sd = socket (AF_INET, SOCK_STREAM, 0);       CHK_ERR(sd, 
"socket");

   memset (&sa, '\0', sizeof(sa));
   sa.sin_family      = AF_INET;
   sa.sin_addr.s_addr = inet_addr ("127.0.0.1");   /* Server IP 
*/
   sa.sin_port        = htons     (1111);          /* Server Port 
number */

   err = connect(sd, (struct sockaddr*) &sa,
                 sizeof(sa));                   CHK_ERR(err, 
"connect");

   /* ----------------------------------------------- */
   /* Now we have TCP conncetion. Start SSL negotiation. */

  ssl = SSL_new (ctx);                         CHK_NULL(ssl);
   SSL_set_fd (ssl, sd);
   err = SSL_connect (ssl);                     CHK_SSL(err);

   /* Following two steps are optional and not required for
      data exchange to be successful. */

   /* Get the cipher - opt */

   printf ("SSL connection using %s\n", SSL_get_cipher (ssl));

   /* Get server's certificate (note: beware of dynamic 
allocation) - opt */

   server_cert = SSL_get_peer_certificate (ssl);       
CHK_NULL(server_cert);
   printf ("Server certificate:\n");

   /* DATA EXCHANGE - Send a message and receive a reply. */

   err = SSL_write (ssl, "Hello World!", strlen("Hello World!"));  
CHK_SSL(err);

   err = SSL_read (ssl, buf, sizeof(buf) - 1);                     
CHK_SSL(err);
   buf[err] = '\0';
   printf ("Got %d chars:'%s'\n", err, buf);
   SSL_shutdown (ssl);  /* send SSL/TLS close_notify */

   /* Clean up. */

   close (sd);
   SSL_free (ssl);
   SSL_CTX_free (ctx);
}







_________________________________________________________
Click below to visit monsterindia.com and review jobs in India or 
Abroad
http://monsterindia.rediff.com/jobs


---------------------------
Shalendra Chhabra
Laboratoire Specification et Verification,
Ecole Normale Superieure De Cachan,
Pavillon Des Jardins,
Chambre n 215,
61 Avenue Du President Wilson,
Cachan Cedex
France
ph office (from 10 to 5 )
01-47-40-24-87

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

* Help required
@ 2002-03-07  3:57 Navin K Sinha
  0 siblings, 0 replies; 10+ messages in thread
From: Navin K Sinha @ 2002-03-07  3:57 UTC (permalink / raw)
  To: gcc-help

Hi,
I need some information about how the GCC compiler handles inline assembly
... More specifically I need info on :
1) does the compiler parse the individual assembly instructions present in
the assembler template; where in  the source code of GCC  does this
happen?
2) are these instructions inserted into the intermediate representation of
the rest of the code ? where in the source code of GCC does this happen ?

Thanks for the information.
Regards,
Navin

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

* Help Required
@ 2000-04-10 17:23 Sharma, SumanX
  0 siblings, 0 replies; 10+ messages in thread
From: Sharma, SumanX @ 2000-04-10 17:23 UTC (permalink / raw)
  To: 'help-gcc@gnu.org'

Hi,
   I am suman sharma from intel corp. I want to find out memory leakage is
any application while running. I have gdb to debug it. Will it be possible
to find the memory leakage using gdb..??? or can i use checker with gdb to
find memory leak..??
or if any one of you have some better idea, pls let me know.
thanks in advance,
regards
suman

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

end of thread, other threads:[~2013-04-18 10:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-18  8:14 Help required sonal
2013-04-18 10:09 ` Chung-Ju Wu
  -- strict thread matches above, loose matches on Subject: below --
2003-09-29  4:52 help required josephine
2003-06-06  4:37 Help Required Phani Pavan
2002-05-11  8:13 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

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