------- Comment #1 from tobias dot burnus at physik dot fu-berlin dot de 2006-06-23 13:01 ------- Additional remarks (which I forget to make):
Both cases are valid Fortran as: (1) If the length of 'variable' is less than that of 'expr', the value of 'expr' is truncated from the right until it is the same length as the 'variable'. (2) If the length of 'variable' is greater than that of 'expr', the value of 'expr' is extended on the right with blanks until it is the same length as the variable. However, I still think it is useful to give a compile-time warning. This for example should produce a warning: ---------------------------------------- program test character(20),parameter :: path = 'mypath/' character(20),parameter :: file = path // 'myfile.txt' print *, trim(file) end program test ---------------------------------------- whereas using "trim(path) // 'myfile.txt'" should not. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27996