public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name
       [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
@ 2014-06-25 19:31 ` arthur.j.odwyer at gmail dot com
  2014-06-26 11:41 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2014-06-25 19:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
Already filed against Clang: http://llvm.org/bugs/show_bug.cgi?id=19141


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

* [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name
       [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
  2014-06-25 19:31 ` [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name arthur.j.odwyer at gmail dot com
@ 2014-06-26 11:41 ` rguenth at gcc dot gnu.org
  2014-08-10  9:04 ` potswa at mac dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-26 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-06-26
     Ever confirmed|0                           |1
      Known to fail|                            |3.2.3, 4.3.4, 4.9.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed with 4.9.0.  2.95 prints

t.c:3: badly punctuated parameter list in `#define'


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

* [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name
       [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
  2014-06-25 19:31 ` [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name arthur.j.odwyer at gmail dot com
  2014-06-26 11:41 ` rguenth at gcc dot gnu.org
@ 2014-08-10  9:04 ` potswa at mac dot com
  2014-08-11  7:09 ` potswa at mac dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: potswa at mac dot com @ 2014-08-10  9:04 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 7788 bytes --]

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

David Krauss <potswa at mac dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |potswa at mac dot com

--- Comment #3 from David Krauss <potswa at mac dot com> ---
The surprising result is because you passed print to itself, and the ##
operator disables pre-expansion of argument tokens. If you want to expand
print(print(…)), you can use the double-expansion idiom used for other special
macros.

#define do_print(x,...) (print(1,"macro"),print(1, ##__VA_ARGS__))
#define print(...) do_print( __VA_ARGS__ )

GCC 2.95 is not a role model. Regardless of what future compilers do, you
should suggest the above fix to the Boost.ScopeExit maintainer.

Note that I plan to propose the current behavior for standardization; see
http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3882.pdf . (It is dated in
the past, but it has not been processed yet due to a technicality.) Your use
case does sound quite reasonable, but unless the implementations move soon, the
door might shut as it ceases to have the flexibility of a GCC extension.

On the other hand, if GCC does change here, I'll be compelled to propose
standardizing the update instead.
>From gcc-bugs-return-458099-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Aug 10 09:39:13 2014
Return-Path: <gcc-bugs-return-458099-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20373 invoked by alias); 10 Aug 2014 09:39:13 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 20348 invoked by uid 48); 10 Aug 2014 09:39:07 -0000
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/62078] New: [4.10 Regression] ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 2 with -fdelete-dead-exceptions
Date: Sun, 10 Aug 2014 09:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: zsojka at seznam dot cz
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-62078-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-08/txt/msg00596.txt.bz2
Content-length: 4484

https://gcc.gnu.org/bugzilla/show_bug.cgi?idb078

            Bug ID: 62078
           Summary: [4.10 Regression] ICE: verify_flow_info failed:
                    missing REG_EH_REGION note at the end of bb 2 with
                    -fdelete-dead-exceptions
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 33278
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3278&actioníit
mostly reduced testcase

Compiler output:
$ $ /mnt/svn/gcc-trunk/binary-latest/bin/gcc -Og -fdelete-dead-exceptions
-fnon-call-exceptions testcase.C
testcase.C: In function 'void foo()':
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 40
 }
 ^
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 38
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 36
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 34
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 32
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 30
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 28
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 26
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 24
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 22
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 18
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 16
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 14
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 12
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 10
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 8
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 6
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 4
testcase.C:31:1: error: missing REG_EH_REGION note at the end of bb 2
testcase.C:31:1: internal compiler error: verify_flow_info failed
0x91f1d6 verify_flow_info()
        /mnt/svn/gcc-trunk/gcc/cfghooks.c:260
0xc28ac4 execute_function_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:1761
0xc294d3 execute_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:1806
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  internal_error (gmsgid=gmsgid@entry=0x16e67fb "verify_flow_info failed") at
/mnt/svn/gcc-trunk/gcc/diagnostic.c:1130
#1  0x000000000091f1d7 in verify_flow_info () at
/mnt/svn/gcc-trunk/gcc/cfghooks.c:260
#2  0x0000000000c28ac5 in execute_function_todo (fn=0x7ffff6dfc498,
data=<optimized out>) at /mnt/svn/gcc-trunk/gcc/passes.c:1761
#3  0x0000000000c294d4 in execute_todo (flags\x131136) at
/mnt/svn/gcc-trunk/gcc/passes.c:1806
#4  0x0000000000c2b86e in execute_one_pass (pass=pass@entry=0x1f9f350) at
/mnt/svn/gcc-trunk/gcc/passes.c:2162
#5  0x0000000000c2bdb6 in execute_pass_list_1 (pass=0x1f9f350) at
/mnt/svn/gcc-trunk/gcc/passes.c:2201
#6  0x0000000000c2bdc8 in execute_pass_list_1 (pass=0x1f9e9f0,
pass@entry=0x1f9b930) at /mnt/svn/gcc-trunk/gcc/passes.c:2202
#7  0x0000000000c2be09 in execute_pass_list (fn=0x7ffff6dfc498, pass=0x1f9b930)
at /mnt/svn/gcc-trunk/gcc/passes.c:2212
#8  0x000000000094ab40 in expand_function (node=node@entry=0x7ffff6aa7450) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1776
#9  0x000000000094c20c in expand_all_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1910
#10 compile () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2254
#11 0x000000000094dba5 in finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2331
#12 0x000000000072a166 in cp_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/cp/decl2.c:4644
#13 0x0000000000d268bd in compile_file () at
/mnt/svn/gcc-trunk/gcc/toplev.c:562
#14 0x0000000000d28c05 in do_compile () at /mnt/svn/gcc-trunk/gcc/toplev.c:1947
#15 toplev_main (argc\x16, argv=0x7fffffffd7b8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2023
#16 0x00007ffff6e67db5 in __libc_start_main () from /lib64/libc.so.6
#17 0x000000000063e401 in _start ()

According to PR61031#c1, this might be just exposed by extended checking in
4.10.

Tested revisions:
r213777 - ICE
4_9 r212703 - OK


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

* [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name
       [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-08-10  9:04 ` potswa at mac dot com
@ 2014-08-11  7:09 ` potswa at mac dot com
  2014-08-11 23:50 ` potswa at mac dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: potswa at mac dot com @ 2014-08-11  7:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from David Krauss <potswa at mac dot com> ---
Created attachment 33288
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33288&action=edit
Fix

Well, I decided to Do The Right Thing for users. Here is a working patch.

Let's see what the maintainers do with it :) .


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

* [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name
       [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-08-11  7:09 ` potswa at mac dot com
@ 2014-08-11 23:50 ` potswa at mac dot com
  2014-08-12  0:08 ` arthur.j.odwyer at gmail dot com
  2014-08-12 13:38 ` manu at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: potswa at mac dot com @ 2014-08-11 23:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from David Krauss <potswa at mac dot com> ---
The patch should already pass the coding standards. I'm already legally
registered as a contributor.

Arthur, can you take care of the rest of the process? (Did you get my email?)

I'd like to take it 100% but the testsuite isn't working on my system. The
patch is small enough and unobscure enough that it's easier for someone else to
take responsibility than for me to dedicate another day to GCC build
configuration.


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

* [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name
       [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-08-11 23:50 ` potswa at mac dot com
@ 2014-08-12  0:08 ` arthur.j.odwyer at gmail dot com
  2014-08-12 13:38 ` manu at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2014-08-12  0:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
@David, sadly, I'm not set up to build or test GCC patches, nor am I registered
as a contributor. Anyone else want to step up?

I could suggest test cases, perhaps, but I wouldn't be good at shepherding this
patch all the way through the process-I've-never-done-before.


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

* [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name
       [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-08-12  0:08 ` arthur.j.odwyer at gmail dot com
@ 2014-08-12 13:38 ` manu at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu.org @ 2014-08-12 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to David Krauss from comment #6)
> I'd like to take it 100% but the testsuite isn't working on my system. The
> patch is small enough and unobscure enough that it's easier for someone else
> to take responsibility than for me to dedicate another day to GCC build
> configuration.

If you are a sporadic contributor, the easiest and cheapest way to work on GCC
is to get an account in the compile farm: https://gcc.gnu.org/wiki/CompileFarm
and use one of the many scripts in contrib/ (or my own gccfarming script:
https://gcc.gnu.org/wiki/ManuelL%C3%B3pezIb%C3%A1%C3%B1ez?action=AttachFile&do=view&target=gccfarming)
to bootstrap and regression test patches.
>From gcc-bugs-return-458275-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 12 14:11:56 2014
Return-Path: <gcc-bugs-return-458275-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31679 invoked by alias); 12 Aug 2014 14:11:55 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30518 invoked by uid 48); 12 Aug 2014 14:11:44 -0000
From: "vapier at gentoo dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/60465] Compiling glibc-2.17,2.18 with gcc-4.8.2 and binutils-2.23.2,2.24 results in segfaults in _start / elf_get_dynamic_info
Date: Tue, 12 Aug 2014 14:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vapier at gentoo dot org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60465-4-1Ay8x1iL87@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60465-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60465-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-08/txt/msg00772.txt.bz2
Content-length: 196

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`465

--- Comment #9 from Mike Frysinger <vapier at gentoo dot org> ---
i've verified that 4.8.0 & 4.9.1 fail as well :/

binutils 2.24 doesn't help


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

end of thread, other threads:[~2014-08-12 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-61613-4@http.gcc.gnu.org/bugzilla/>
2014-06-25 19:31 ` [Bug preprocessor/61613] ,##__VA_ARGS__ fails to expand the first variadic argument if it is a macro-name arthur.j.odwyer at gmail dot com
2014-06-26 11:41 ` rguenth at gcc dot gnu.org
2014-08-10  9:04 ` potswa at mac dot com
2014-08-11  7:09 ` potswa at mac dot com
2014-08-11 23:50 ` potswa at mac dot com
2014-08-12  0:08 ` arthur.j.odwyer at gmail dot com
2014-08-12 13:38 ` manu 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).