Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt-creator/text-editor : Selectively dislikes gcc __attribute__((unused))
Forum Updated to NodeBB v4.3 + New Features

Qt-creator/text-editor : Selectively dislikes gcc __attribute__((unused))

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aCOSwt
    wrote on last edited by
    #1

    Using 2.7.0 :

    If, as part of a C program, I, for example :
    @void *data_collect(attribute((unused))void *arg){@
    Then the editor does not (and rightly) seem unhappy.
    But,
    If, as part of a C++ program, I, for example :
    @bool QT_0707a_MainWin::eventFilter(attribute((unused))QObject *obj,QEvent *event){@
    Then the editor underlines all this in red (as it would do for any big good old syntax error).
    Of course (and rightly), the code will compile fine.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you test with the latest version of QtCreator ? If it's still not good you might consider creating a bug report for it

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved