bugGNU Octave - Bugs: bug #48505, build does not use any warning...

 
 

bug #48505: build does not use any warning options in libgui/qterminal

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Wed 13 Jul 2016 10:29:04 PM UTC  
 
Category: Configuration and Build SystemSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Feature Request
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 14 Jul 2016 09:20:42 PM UTC, comment #2:

Simplifying the way we handle the compiler flags would be good. I'd prefer to not enable warnings in the qterminal code though. So how about applying your changes except that in the /libgui/qterminal-module.mk file, use the attached change?

(file #37877)

John W. Eaton <jwe>
Project Administrator
Wed 13 Jul 2016 10:31:23 PM UTC, comment #1:

And here's what I have changed so far, which simplifies all the compiler flags defined throughout the project but causes all these warnings to be emitted.

(file #37865)

Mike Miller <mtmiller>
Project Administrator
Wed 13 Jul 2016 10:29:04 PM UTC, original submission:

Octave's configure script sets some default compiler options in the variables $(CXXFLAGS), $(AM_CXXFLAGS), and $(XTRA_CXXFLAGS), as well as some gcc warning options in the variable $(WARN_CXXFLAGS).

The top-level Makefile.am does

and then every subdirectory does its own

This seems pretty redundant and wasteful, so I tried to simplify this by just adding the WARN_ flags to the AM_ flags at the top and eliminating all of the unnecessary foo_CXXFLAGS. The end result is that all the flags end up being the same, but we are intentionally omitting warning flags from the libgui/qterminal subdirectory.

The qterminal code (that we imported from somewhere else) contains many many warnings that our default flags would catch, including

  • 836 counts of -Wold-style-cast
  • 15 counts of -Wunused-variable
  • 7 counts of -Wcast-qual
  • 6 counts of -Wshadow
  • 1 count of -Wunused-parameter

This is not a huge priority, and maybe we leave it as it is now, but good to remember that there is potentially buggy code in the qterminal directory, and maybe we can fix it or maybe we replace the entire command window implementation before that happens.

Mike Miller <mtmiller>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #37877:  diffs.txt added by jwe (530B - text/plain)
file #37865:  cflags-simplify.diff added by mtmiller (10KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by mtmiller (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Jul 2016 09:20:42 PM UTCjweAttached File-=>Added diffs.txt, #37877
    Wed 13 Jul 2016 10:31:23 PM UTCmtmillerAttached File-=>Added cflags-simplify.diff, #37865

    Back to the top


    Powered by Savane 3.1-cleanup1