[Intel C++/Linux] bogus/inconsistent warning #279 on !"..."
-----------------------------------------------------------

                 Key: STDCXX-487
                 URL: https://issues.apache.org/jira/browse/STDCXX-487
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: Intel C++ 9 and 10/Linux
            Reporter: Martin Sebor


>From https://premier.intel.com/premier/IssueDetail.aspx?IssueID=431380:

The warning below is not justified and should not be issued. It produces noise 
for the common idiom: assert(!"...") used, for example, in case and switch 
statements to indicate unhandled cases. (I believe more recent versions of the 
EDG front end than the one used by icc 9 do not issue the warning anymore.)

$ cat t.cpp && icc -V t.cpp
int main (int argc, char**)
{
(!1 == argc) ? (void)0 : (void)0;
(!"" == argc) ? (void)0 : (void)0;
}
Intel(R) C Compiler for Intel(R) EM64T-based applications, Version 9.1 Build 
20070320 Package ID: l_cc_c_9.1.049
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.

Edison Design Group C/C++ Front End, version 3.6 (Mar 22 2007 02:18:08)
Copyright 1988-2005 Edison Design Group, Inc.

t.cpp(4): warning #279: controlling expression is constant
(!"" == argc) ? (void)0 : (void)0;
^

GNU ld version 2.15.92.0.2 20040927

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to