public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/89055] wrong location with macros
[not found] <bug-89055-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-11 5:44 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: pinskia at gcc dot gnu.org @ 2021-12-11 5:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89055
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|wrong location with |wrong location with macros
|predefined macros |
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
In this case it is just the macro in general, not really the predefined one
that makes a difference:
#define S_MAX (18446744073709551615UL)
char a[~0LU << 1];
char b0[S_MAX << 1];
char b[__SIZE_MAX__ << 1];
---- CUT ----
<source>:2:13: error: size '18446744073709551614' of array 'a' exceeds maximum
object size '9223372036854775807'
2 | char a[~0LU << 1];
| ~~~~~^~~~
<source>:3:15: error: size '18446744073709551614' of array 'b0' exceeds maximum
object size '9223372036854775807'
3 | char b0[S_MAX << 1];
| ^
<source>:4:21: error: size '18446744073709551614' of array 'b' exceeds maximum
object size '9223372036854775807'
4 | char b[__SIZE_MAX__ << 1];
| ^
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-11 5:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-89055-4@http.gcc.gnu.org/bugzilla/>
2021-12-11 5:44 ` [Bug c++/89055] wrong location with macros pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).