Results 1 to 6 of 6

Thread: Where are my compiler warnings?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11
    Thanks
    30
    Thanked 13 Times in 12 Posts

    Default Re: Where are my compiler warnings?

    According to the g++ man page, optimization is required for the compiler to be able to notice uninitialized variables.
    I tried compiling with -O1 and without any -O, in neither case do I get a warning about "ptr may be used initialized".

  2. #2
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11
    Thanks
    30
    Thanked 13 Times in 12 Posts

    Default Re: Where are my compiler warnings?

    There seems to be a lively discussion about how to handle uninitialized variables: http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

Similar Threads

  1. QMdiSubWindow - Warnings while compile
    By estanisgeyer in forum Qt Programming
    Replies: 2
    Last Post: 3rd February 2009, 15:37
  2. Useless but curious compiler warning question
    By Raccoon29 in forum General Programming
    Replies: 4
    Last Post: 30th July 2008, 20:46
  3. problem to compile exemple qt4 with xlC compiler
    By poulacou in forum Qt Programming
    Replies: 1
    Last Post: 16th April 2008, 14:59
  4. Replies: 7
    Last Post: 24th March 2007, 13:53
  5. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.