Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101635

Using QLoggingCategory logging macros with -pedantic compile option throws a warning

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 5.12.10, 6.2.3
    • Core: I/O
    • None
    • macOs 12.1
      Apple clang version 13.0.0
    • macOS

    Description

      Steps to reproduce:
      1. Create a simple project.
      2. Set the -pedantic option.
      3. Use any of the QLoggingCategory macros (qCInfo, QCWarning ...) with the stream operator.

      qCInfo( foo ) << "Hello, World!";
      

      4. Compile

      Expected Results: Clean compile output.
      Actual Results: -Wgnu-zero-variadic-macro-arguments warning is fired

      warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]
      

      Notes: You can use the attached sample to reproduce the issue.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            zapryan.d Zapryan Dimitrov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes