Author Topic: gfortran - nonconforming tabs warning  (Read 5065 times)

Offline gib

  • Multiple posting newcomer
  • *
  • Posts: 42
gfortran - nonconforming tabs warning
« on: September 30, 2019, 12:42:21 am »
Since my Fortran code has a great number of tabs, the compiler warning is very annoying - the great number of tabs warning messages drowning out other warnings.  I've followed suggestions that either -Wtabs or -Wno-tabs has the effect of suppressing these warnings, but in CB neither has that effect.  Does somebody know the solution to this?

Thanks
Gib

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline gib

  • Multiple posting newcomer
  • *
  • Posts: 42
Re: gfortran - nonconforming tabs warning
« Reply #2 on: September 30, 2019, 06:05:03 am »
No, that doesn't help.  I'm sure some other Fortran programmers using CB must have encountered this issue.
To check how gfortran behaves outside of CB, I compiled a trivial test program:
Code
program main
integer :: i, j, k
k = 0
do i = 1,10
do j = 1,3
k = k+10
enddo
enddo
write(*,*) 'k: ',k
end program

where the indentation on lines 5,6,7 uses tabs.

Compiled with
>gfortran -c test.f90
there are no warnings.
With
>gfortran -c -Wtabs test.f90
there are 3 tabs warnings
With
>gfortran -c -Wno-tabs test.f90
there are no warnings.

Using -Wtabs, -Wno-tabs or no compiler option in CB gives tabs warnings.  I have not been able to find any combination of compiler switches that turns these warnings off.  It is frustrating.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: gfortran - nonconforming tabs warning
« Reply #3 on: September 30, 2019, 02:46:02 pm »
It says this:
Quote
I would start by turning on full Compiler logging.

This is done by selecting the "Full command line" option Under menu "Settings" -> "Compiler" -> Global compiler settings -> [the compiler you use] -> "Other Setting" tab, "Compiler logging". In 12.11 and newer this is enabled by default.
...
* You should review all the commands and their options;
...

Have you done it? Are they the same as the ones for your command line invocation of the compiler?

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: gfortran - nonconforming tabs warning
« Reply #4 on: September 30, 2019, 03:01:18 pm »
Also
Quote
If you have no luck, you can try to ask in the forum, but read first "How do I report a compilation problem on the forums"
and there:
Quote
Build log:
Code
Paste full build log here. (It is found in the 'Build log' tab). Please make always a 'rebuild' (Menu: Build->Rebuild) or a 'clean' and 'build' before you copy the full build log. 

Offline gib

  • Multiple posting newcomer
  • *
  • Posts: 42
Re: gfortran - nonconforming tabs warning
« Reply #5 on: October 02, 2019, 01:05:41 am »
I have discovered that contrary to my expectations, the compiler options in Settings override (occur later in the gfortran command line) those in Build options.  In Settings (for no apparent reason) I had -Wtabs in the Other compiler options.  My mistakes, in other words. 
Apologies for time wasted on this.