tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* C compiler problem
@ 1997-11-21 13:44 LBRO
  0 siblings, 0 replies; 2+ messages in thread
From: LBRO @ 1997-11-21 13:44 UTC (permalink / raw)
  To: tru64-unix-managers


     Hi,
     
     All other C compilers that I know of agree that n is a constant when 
     declared const. However, DEC C V5.2 says it is not.
     
     The following alternatives are possible:
     
     1. It is an error that I have to report to Digital.
     
     2. It is optional and some obscure switch setting will make cc accept 
        the code.
     
     3. It conforms to ANSI standard (and everybody else are sloppy having
        n be a constant-expression when declared const int n = 7).
     
     
     
     
     
     
     # cat p.c
     main()
     {
             const int n = 10;
             char s[n];
     }
     # cc -c p.c
     cc: Error: p.c, line 4: In the declaration of "s", "n" is not 
     constant, but occurs in a context that requires a constant expression.
             char s[n];
     ---------------^
     # 
     
     
     Yours,
     Lars Bro (lbro@dscc.dk)

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

* C++ compiler problem
@ 2001-07-03 13:45 Padiyath Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Padiyath Kumar @ 2001-07-03 13:45 UTC (permalink / raw)
  To: tru64-unix-managers


   Iam getting unsatisfied externals by the compilation of a C++ program:

 $cxx -V adip.cpp 
Compaq C++ V6.3-002 for Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-002 (cxx) cxx Driver
$cxx adip.cpp
ld:
Unresolved:
sqrt

    OS = V5.1 with the latest patches installed

  sizer -v output:
  
  $/usr/sbin/sizer -v
Compaq Tru64 UNIX V5.1 (Rev. 732); Fri May 25 11:24:22 GMT 2001

     Any help is appreciated.

   Inside the program the statement look like this:

  b=sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);

   regards,
   Kumar

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

end of thread, other threads:[~2001-07-03 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-11-21 13:44 C compiler problem LBRO
  -- strict thread matches above, loose matches on Subject: below --
2001-07-03 13:45 C++ " Padiyath Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox