[Bug preprocessor/58770] GCC very slow compiling with #pragma once

2014-06-27 Thread olafurw at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58770

Ólafur Waage  changed:

   What|Removed |Added

 CC||olafurw at gmail dot com

--- Comment #1 from Ólafur Waage  ---
Created attachment 33017
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33017&action=edit
Log of running the attached tests

I have added an attachment of me running the test on GCC 4.8.2, I can run on a
newer version if needed, it was just what I had at the time.

[Bug c++/105497] New: -Wswitch ignores [[maybe_unused]] for an enumerator

2022-05-05 Thread olafurw at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105497

Bug ID: 105497
   Summary: -Wswitch ignores [[maybe_unused]] for an enumerator
   Product: gcc
   Version: 11.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: olafurw at gmail dot com
  Target Milestone: ---

enum class Button
{
Left,
Right,
Middle,
NumberOfButtons [[maybe_unused]]
};

int main()
{
Button b = Button::Left;
switch (b) {
case Button::Left:
case Button::Right:
case Button::Middle:
break;
//#ifdef __GNUC__
//case Button::NumberOfButtons:
//__builtin_unreachable();
//#endif
}
}

https://godbolt.org/z/d5M5MYc45

No warning generated for Clang or MSVC but it does for GCC. Works with
__builtin_unreachable()

LLVM bug report about the same thing:
https://bugs.llvm.org/show_bug.cgi?id=36231