Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-487

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: External
    • Labels:
      None
    • Environment:

      Intel C++ 9 and 10/Linux

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebor Martin Sebor
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: