This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Declaration problems


In a message dated 12/10/99 12:28:36 PM Pacific Standard Time, marilyn@CAE.CA 
writes:

>       Integer*2 size_businfo, max_businfo, max_dmc
>       parameter (size_businfo = 15)
>       parameter (max_businfo = 3500)
>       parameter (max_dmc = 2)
>       Integer*4 businfo(size_businfo*max_businfo*max_dmc)

As you must mean for the multiplication to be carried out in integer*4 
format, it would be prudent to make the individual multiplicands integer*4.  
It appears that you will get overflow if the calculation should be signed and 
not promoted out of integer*2.

Tim
tprince@computer.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]