public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gcc] rhel-f41-base: 5.0.0-0.6
Date: Mon, 29 Jun 2026 12:26:32 GMT [thread overview]
Message-ID: <178273599256.1.16908377627729824798.rpms-gcc-ff411575ccf0@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gcc
Branch : rhel-f41-base
Commit : ff411575ccf04625068f1cc9403100292807d3b7
Author : Jakub Jelinek <jakub@redhat.com>
Date : 2015-01-30T20:16:01+01:00
Stats : +104/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gcc/c/ff411575ccf04625068f1cc9403100292807d3b7?branch=rhel-f41-base
Log:
5.0.0-0.6
---
diff --git a/gcc.spec b/gcc.spec
index df34e41..aebfa3e 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -200,6 +200,7 @@ Patch13: gcc5-aarch64-async-unw-tables.patch
Patch14: gcc5-libsanitize-aarch64-va42.patch
Patch15: gcc5-pr61925.patch
Patch16: gcc5-pr64817.patch
+Patch17: gcc5-pr64803.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -751,6 +752,7 @@ rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch14 -p0 -b .libsanitize-aarch64-va42~
%patch15 -p0 -b .pr61925~
%patch16 -p0 -b .pr64817~
+%patch17 -p0 -b .pr64803~
%if 0%{?_enable_debug_packages}
mkdir dwz-wrapper
@@ -2957,6 +2959,7 @@ fi
tree-optimization/64853, ubsan/64741
- fix up #pragma GCC target handling on x86 (PR target/61925)
- fix up VTA compile time hog during expansion (PR debug/64817)
+- __LINE__ handling fix (PR preprocessor/64803)
* Fri Jan 23 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.5
- new package
diff --git a/gcc5-pr64803.patch b/gcc5-pr64803.patch
new file mode 100644
index 0000000..db3558d
--- /dev/null
+++ b/gcc5-pr64803.patch
@@ -0,0 +1,101 @@
+2015-01-30 Dodji Seketeli <dodji@redhat.com>
+
+ PR preprocessor/64803
+ * internal.h (cpp_reader::top_most_macro_node): New data member.
+ * macro.c (enter_macro_context): Pass the location of the end of
+ the top-most invocation of the function-like macro, or the
+ location of the expansion point of the top-most object-like macro.
+ (cpp_get_token_1): Store the top-most macro node in the new
+ pfile->top_most_macro_node data member.
+
+ * gcc.dg/cpp/builtin-macro-1.c: New test case.
+
+--- libcpp/internal.h
++++ libcpp/internal.h
+@@ -421,6 +421,11 @@ struct cpp_reader
+ macro invocation. */
+ source_location invocation_location;
+
++ /* This is the node representing the macro being expanded at
++ top-level. The value of this data member is valid iff
++ in_macro_expansion_p() returns TRUE. */
++ cpp_hashnode *top_most_macro_node;
++
+ /* Nonzero if we are about to expand a macro. Note that if we are
+ really expanding a macro, the function macro_of_context returns
+ the macro being expanded and this flag is set to false. Client
+--- libcpp/macro.c
++++ libcpp/macro.c
+@@ -1228,7 +1228,24 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node,
+
+ pfile->about_to_expand_macro_p = false;
+ /* Handle built-in macros and the _Pragma operator. */
+- return builtin_macro (pfile, node, location);
++ {
++ source_location loc;
++ if (/* The top-level macro invocation that triggered the expansion
++ we are looking at is with a standard macro ...*/
++ !(pfile->top_most_macro_node->flags & NODE_BUILTIN)
++ /* ... and it's a function-like macro invocation. */
++ && pfile->top_most_macro_node->value.macro->fun_like)
++ /* Then the location of the end of the macro invocation is the
++ location of the closing parenthesis. */
++ loc = pfile->cur_token[-1].src_loc;
++ else
++ /* Otherwise, the location of the end of the macro invocation is
++ the location of the expansion point of that top-level macro
++ invocation. */
++ loc = location;
++
++ return builtin_macro (pfile, node, loc);
++ }
+ }
+
+ /* De-allocate the memory used by BUFF which is an array of instances
+@@ -2460,9 +2477,13 @@ cpp_get_token_1 (cpp_reader *pfile, source_location *location)
+ {
+ int ret = 0;
+ /* If not in a macro context, and we're going to start an
+- expansion, record the location. */
++ expansion, record the location and the top level macro
++ about to be expanded. */
+ if (!in_macro_expansion_p (pfile))
+- pfile->invocation_location = result->src_loc;
++ {
++ pfile->invocation_location = result->src_loc;
++ pfile->top_most_macro_node = node;
++ }
+ if (pfile->state.prevent_expansion)
+ break;
+
+--- gcc/testsuite/gcc.dg/cpp/builtin-macro-1.c
++++ gcc/testsuite/gcc.dg/cpp/builtin-macro-1.c
+@@ -0,0 +1,28 @@
++/* Origin PR preprocessor/64803
++
++ This test ensures that the value the __LINE__ macro expands to is
++ constant and corresponds to the line of the closing parenthesis of
++ the top-most function-like macro expansion it's part of.
++
++ { dg-do run }
++ { do-options -no-integrated-cpp } */
++
++#include <assert.h>
++
++#define C(a, b) a ## b
++#define L(x) C(L, x)
++#define M(a) int L(__LINE__) = __LINE__; assert(L(__LINE__) == __LINE__);
++
++int
++main()
++{
++ M(a
++ );
++
++ assert(L20 == 20); /* 20 is the line number of the
++ closing parenthesis of the
++ invocation of the M macro. Please
++ adjust in case the layout of this
++ file changes. */
++ return 0;
++}
next reply other threads:[~2026-06-29 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 12:26 Jakub Jelinek [this message]
2026-06-29 12:26 [rpms/gcc] rhel-f41-base: 5.0.0-0.6 Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178273599256.1.16908377627729824798.rpms-gcc-ff411575ccf0@fedoraproject.org \
--to=jakub@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox