This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/66938] using bool as destination in overflow checkers


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66938

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |msebor at gcc dot gnu.org
         Resolution|---                         |FIXED
      Known to fail|                            |5.3.0, 6.3.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
This was fixed in r237754.  Current trunk (GCC 7.0) prints the following
errors:

$ cat t.c && gcc -S -Wall t.c
void f (void)
{
  _Bool b;
  __builtin_add_overflow (0, 0, &b);

  enum E { e0 } e;
  __builtin_add_overflow (0, 0, &e);

  char c;
  __builtin_add_overflow (0, 0, &c);
}
t.c: In function ‘f’:
t.c:4:33: error: argument 3 in call to function ‘__builtin_add_overflow’ has
pointer to boolean type
   __builtin_add_overflow (0, 0, &b);
                                 ^
t.c:7:33: error: argument 3 in call to function ‘__builtin_add_overflow’ has
pointer to enumerated type
   __builtin_add_overflow (0, 0, &e);
                                 ^

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]