This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with integer kind


2012/6/17 Steve Kargl:
> On Sun, Jun 17, 2012 at 01:35:15PM +0200, Andrea Negri wrote:
>>
>> Could it be a bug of the the compiler?
>
>
> It's a bug in your expectations of what you think the
> program should do. ?Please read your favorite Fortran
> text's discussion of integer literal constants.

Perhaps the wording of the error message can be changed slighly to
include the term literal constant. Something like:

Error: Integer literal constant too big for its kind at (1).

I think many inexperienced fortran users have run into this mistake (I
know I have). Even though the (1) already points to the correct place
of the error, making it even more explicit that the error is
completely in the rhs of the assignment, and has nothing to do with
the kind of the integer variable on the lhs, might make it easier for
users to come to the right conclusion themselves, without having to
ask someone else.


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