public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104197] New: clang: gcc/cp/pt.cc:28481:19: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function]
@ 2022-01-24  7:59 marxin at gcc dot gnu.org
  2022-01-24  8:20 ` [Bug c++/104197] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-24  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104197
           Summary: clang: gcc/cp/pt.cc:28481:19: warning: predefined
                    identifier is only valid inside function
                    [-Wpredefined-identifier-outside-function]
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: ppalka at gcc dot gnu.org
  Target Milestone: ---

I noticed the following new warning by clang:

/home/marxin/Programming/gcc/gcc/cp/pt.cc:28481:19: warning: predefined
identifier is only valid inside function
[-Wpredefined-identifier-outside-function]
             int level = current_template_depth + 1)
                         ^
/home/marxin/Programming/gcc/gcc/cp/cp-tree.h:1903:29: note: expanded from
macro 'current_template_depth'
  (current_template_parms ? TMPL_PARMS_DEPTH (current_template_parms) : 0)
                            ^
/home/marxin/Programming/gcc/gcc/cp/cp-tree.h:3802:38: note: expanded from
macro 'TMPL_PARMS_DEPTH'
  ((HOST_WIDE_INT) TREE_INT_CST_LOW (TREE_PURPOSE (NODE)))
                                     ^
/home/marxin/Programming/gcc/gcc/tree.h:1098:29: note: expanded from macro
'TREE_PURPOSE'
#define TREE_PURPOSE(NODE) (TREE_LIST_CHECK (NODE)->list.purpose)
                            ^
./tree-check.h:8:28: note: expanded from macro 'TREE_LIST_CHECK'
#define TREE_LIST_CHECK(t)      TREE_CHECK (t, TREE_LIST)
                                ^
/home/marxin/Programming/gcc/gcc/tree.h:252:39: note: expanded from macro
'TREE_CHECK'
(tree_check ((T), __FILE__, __LINE__, __FUNCTION__, (CODE)))
                                      ^
Is it something we should care about, or is it a false alarm?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-24 16:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24  7:59 [Bug c++/104197] New: clang: gcc/cp/pt.cc:28481:19: warning: predefined identifier is only valid inside function [-Wpredefined-identifier-outside-function] marxin at gcc dot gnu.org
2022-01-24  8:20 ` [Bug c++/104197] " pinskia at gcc dot gnu.org
2022-01-24  8:23 ` pinskia at gcc dot gnu.org
2022-01-24  8:23 ` [Bug c++/104197] [12 Regression] " pinskia at gcc dot gnu.org
2022-01-24  8:30 ` pinskia at gcc dot gnu.org
2022-01-24  8:32 ` pinskia at gcc dot gnu.org
2022-01-24  9:25 ` rguenth at gcc dot gnu.org
2022-01-24 14:33 ` ppalka at gcc dot gnu.org
2022-01-24 16:48 ` cvs-commit at gcc dot gnu.org
2022-01-24 16:48 ` ppalka 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).