This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c/30719] New: gcc should probably warn if users compile without -O


Compiling without -O causes severe consequences that can easily
be avoided, i.e. see the "wontfix" bug 25575.

people expect to have warnings for use of uninitialized variables,
I dont know if this behaviour has always been the same across gcc
versions but regardless, the user cant be expected to read the whole
manual to stumble upon this one alarming detail.

If there is no reason to ever compile without -O, then that should
probably be completely disabled, otherwise there should be a warning
I think "BEWARE!!! you are compiling without optimization - some
warnings and errors will be missed"

This would have saved me 2 weeks of tracking down the uninitialized
bytes without the compiler's help.


-- 
           Summary: gcc should probably warn if users compile without -O
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tvb at gnome dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30719


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