public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
@ 2014-11-12  9:58 ` rguenth at gcc dot gnu.org
  2014-11-12 16:37 ` iains at gcc dot gnu.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-12  9:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |5.0


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
  2014-11-12  9:58 ` [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM rguenth at gcc dot gnu.org
@ 2014-11-12 16:37 ` iains at gcc dot gnu.org
  2014-11-12 16:40 ` iains at gcc dot gnu.org
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2014-11-12 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu.org

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
*** Bug 63834 has been marked as a duplicate of this bug. ***


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
  2014-11-12  9:58 ` [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM rguenth at gcc dot gnu.org
  2014-11-12 16:37 ` iains at gcc dot gnu.org
@ 2014-11-12 16:40 ` iains at gcc dot gnu.org
  2014-11-12 18:46 ` emsr at gcc dot gnu.org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2014-11-12 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-12
     Ever confirmed|0                           |1

--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
confirmed - 
another trivial reproducer.

#ifdef __has_attribute
  #if __has_attribute(availability)
     /* use better attributes if possible */
  #endif
#endif

note - this blocks bootstrap on x86_64-darwin12, which uses that construct in
an unavoidable system header (it's only pure luck AFAICT that it doesn't break
on darwin13, and darwin14).


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-11-12 16:40 ` iains at gcc dot gnu.org
@ 2014-11-12 18:46 ` emsr at gcc dot gnu.org
  2014-11-12 18:47 ` emsr at gcc dot gnu.org
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-11-12 18:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from emsr at gcc dot gnu.org ---
Created attachment 33949
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33949&action=edit
Quick patch.

I'm not on a box I can easily build and test.

Here is a quick one leaving aside the question of whether this cb needs defined
in other contests.

At least let's not not invoke non-existent cb.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-11-12 18:46 ` emsr at gcc dot gnu.org
@ 2014-11-12 18:47 ` emsr at gcc dot gnu.org
  2014-11-12 19:00 ` trippels at gcc dot gnu.org
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-11-12 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from emsr at gcc dot gnu.org ---
Can someone quick try that?


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-11-12 18:47 ` emsr at gcc dot gnu.org
@ 2014-11-12 19:00 ` trippels at gcc dot gnu.org
  2014-11-12 19:17 ` emsr at gcc dot gnu.org
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-11-12 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to emsr from comment #4)
> Can someone quick try that?

Yes. It doesn't work. 

trippels@gcc2-power8 test % /home/trippels/gcc_test/usr/local/bin/g++ -I ./ -MM
test.cpp
./1.h:5:6: error: missing binary operator before token "("
 #if  __has_attribute(alloc_size)
      ^


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-11-12 19:00 ` trippels at gcc dot gnu.org
@ 2014-11-12 19:17 ` emsr at gcc dot gnu.org
  2014-11-12 19:21 ` trippels at gcc dot gnu.org
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-11-12 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from emsr at gcc dot gnu.org ---
Created attachment 33952
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33952&action=edit
Just remove the define of the __has_attribute macro entirely.

Just remove the define of the __has_attribute macro entirely.

I don't really need it as long as we have __has_cpp_attribute.

Could someone try this s'il vous plait?

I might still want the code in the last patch.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2014-11-12 19:17 ` emsr at gcc dot gnu.org
@ 2014-11-12 19:21 ` trippels at gcc dot gnu.org
  2014-11-12 19:47 ` emsr at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-11-12 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to emsr from comment #6)
> Created attachment 33952 [details]
> Just remove the define of the __has_attribute macro entirely.
> 
> Just remove the define of the __has_attribute macro entirely.
> 
> I don't really need it as long as we have __has_cpp_attribute.
> 
> Could someone try this s'il vous plait?
> 
> I might still want the code in the last patch.

Your second patch fixes the issue, even without the first one.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2014-11-12 19:21 ` trippels at gcc dot gnu.org
@ 2014-11-12 19:47 ` emsr at gcc dot gnu.org
  2014-11-13 15:06 ` emsr at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-11-12 19:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from emsr at gcc dot gnu.org ---
Thank you.

I'll formalize this in a bit.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2014-11-12 19:47 ` emsr at gcc dot gnu.org
@ 2014-11-13 15:06 ` emsr at gcc dot gnu.org
  2014-11-13 15:22 ` emsr at gcc dot gnu.org
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-11-13 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from emsr at gcc dot gnu.org ---
This problem exists also with my baby __has_cpp_attribute.  I have to actually
solve this.

The real answer to this is to also give c-family/c-ppoutput.c a callback to
pretty print these built-in macros.

I'll post after tests complete.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2014-11-13 15:06 ` emsr at gcc dot gnu.org
@ 2014-11-13 15:22 ` emsr at gcc dot gnu.org
  2014-11-13 20:12 ` iains at gcc dot gnu.org
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-11-13 15:22 UTC (permalink / raw)
  To: gcc-bugs

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

emsr at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33949|0                           |1
        is obsolete|                            |
  Attachment #33952|0                           |1
        is obsolete|                            |

--- Comment #10 from emsr at gcc dot gnu.org ---
Created attachment 33958
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33958&action=edit
Add a callback for preprocessor pretty printing.

As noted, the real answer to prevent these preprocessor-only crashes is to
provide a callback that handles __has_attribute.

I don't know how "pretty" the output is - I figure we can address that later if
needs be.

But the crashing doesn't happen and we get output.

Testsuite is still running.
--------------------------------------------------

libcpp:

2014-11-13  Edward Smith-Rowland  <3dw4rd@verizon.net>

    * expr.c (parse_has_attribute): Only call pfile->cb.has_attribute
    if it is non-null.


gcc/c-family:

2014-11-13  Edward Smith-Rowland  <3dw4rd@verizon.net>

    * c-lex.c (cb_has_attribute): Remove old comment.
    * c-cppbuiltin.c (cb_has_attribute): New callback;
    (init_pp_output): Set it.


gcc/testsuite:

2014-11-13  Edward Smith-Rowland  <3dw4rd@verizon.net>

    * g++.dg/cpp1y/pr63831.C: New.
    * g++.dg/cpp1y/pr63831.h: New.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2014-11-13 15:22 ` emsr at gcc dot gnu.org
@ 2014-11-13 20:12 ` iains at gcc dot gnu.org
  2014-11-22 11:12 ` iains at gcc dot gnu.org
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2014-11-13 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> ---
unfortunaely, not quite (yet) complete.

I tried 217505 + c#10 - on x86_64-darwin12 all langs bootstrap proceeds up to
the build of Ada lib.

I reverted r217292 and re-tried - bootstrap passed, so still some gremlin
remains (i'll be glad to try to analyse, but no cycles until the weekend).

Also thanks for doing this work! 
Clang compatibility is a _very_ useful thing on Darwin.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2014-11-13 20:12 ` iains at gcc dot gnu.org
@ 2014-11-22 11:12 ` iains at gcc dot gnu.org
  2014-11-22 16:03 ` iains at gcc dot gnu.org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2014-11-22 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |63773

--- Comment #12 from Iain Sandoe <iains at gcc dot gnu.org> ---
on any darwin post 11, there are headers including __has_attribute.
At present, this PR is only affecting darwin12 - and with c#10 proceeds almost
completely, but still blocks bootstrap building libada.

{hopefully, some analysis of the remaining fail will follow later today}


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2014-11-22 11:12 ` iains at gcc dot gnu.org
@ 2014-11-22 16:03 ` iains at gcc dot gnu.org
  2014-11-22 16:48 ` iains at gcc dot gnu.org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2014-11-22 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Iain Sandoe <iains at gcc dot gnu.org> ---
this might be a hint:

<broken> c.f. <OK - __has_attribute cppdefine commented out>

$ diff -W200 -y --suppress-common-lines  s-oscons-tmplt.i
/GCC/ml/gcc-trunk-apple/gcc/ada/rts/s-oscons-tmplt.i

# 102 "/GCC/ml/gcc-trunk-bust/./gcc/include-fixed/limits.h" 3 4                
                   |    # 102
"/GCC/ml/gcc-trunk-apple/./gcc/include-fixed/limits.h" 3 4
    /* make sure a default max version is set */__has_attribute__
(availability)                   |        /* make sure a default max version is
set */
# 1 "/GCC/ml/gcc-trunk-bust/./gcc/include/stdint.h" 1 3 4                      
                   |    # 1 "/GCC/ml/gcc-trunk-apple/./gcc/include/stdint.h" 1
3 4


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2014-11-22 16:03 ` iains at gcc dot gnu.org
@ 2014-11-22 16:48 ` iains at gcc dot gnu.org
  2014-12-03 16:37 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2014-11-22 16:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> ---
Reproducer:

$ cat t.h
#ifdef __has_attribute
  #if __has_attribute(availability)
     /* use better attributes if possible */
  #endif
#endif

gcc-trunk-bust$ ./gcc/xgcc -Bgcc t.h -E >t.i
gcc-trunk-bust$ more t.i
# 1 "t.h"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "t.h"
__has_attribute__ (availability)


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2014-11-22 16:48 ` iains at gcc dot gnu.org
@ 2014-12-03 16:37 ` jakub at gcc dot gnu.org
  2014-12-05 13:54 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-03 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That looks wrong.  You really can't keep the __has_attribute__(...) in the
preprocessed stream, it should either be not recognized at all (for languages
other than C/C++ - like for CLK_ASM or when the callback is NULL (think about
Fortran preprocessing; that is done as if it was C89, but of course the
callback is not defined and expanding __has_attribute__ doesn't make much sense
in that case).
And, for C/C++ preprocessing without compilation, i.e. c-ppoutput.c, you should
IMHO just do very similar if not the same thing as in c-lex.c.  If something
needs initializing and has not been initialized for the attribute lookup, just
initialize it lazily.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2014-12-03 16:37 ` jakub at gcc dot gnu.org
@ 2014-12-05 13:54 ` jakub at gcc dot gnu.org
  2014-12-05 23:00 ` emsr at gcc dot gnu.org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-05 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|emsr at gcc dot gnu.org            |jakub at gcc dot gnu.org

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34199
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34199&action=edit
gcc5-pr63831.patch

Untested fix.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2014-12-05 13:54 ` jakub at gcc dot gnu.org
@ 2014-12-05 23:00 ` emsr at gcc dot gnu.org
  2014-12-06 11:10 ` iains at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-12-05 23:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from emsr at gcc dot gnu.org ---
Thank you. I knew I was doing this wrong.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2014-12-05 23:00 ` emsr at gcc dot gnu.org
@ 2014-12-06 11:10 ` iains at gcc dot gnu.org
  2014-12-19 12:21 ` jakub at gcc dot gnu.org
  2014-12-19 13:51 ` trippels at gcc dot gnu.org
  20 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2014-12-06 11:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #17)
> Created attachment 34199 [details]
> gcc5-pr63831.patch
> 
> Untested fix.

Thanks Jakub -  Works for me - on x86_64-darwin12 all langs (incl. Ada, Java
and Obj-C++) bootstrap 

[with fix for libcc1 @
https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00568.html]

testing now.


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2014-12-06 11:10 ` iains at gcc dot gnu.org
@ 2014-12-19 12:21 ` jakub at gcc dot gnu.org
  2014-12-19 13:51 ` trippels at gcc dot gnu.org
  20 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Dec 19 12:20:58 2014
New Revision: 218948

URL: https://gcc.gnu.org/viewcvs?rev=218948&root=gcc&view=rev
Log:
    PR preprocessor/63831
    * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
    and __has_cpp_attribute here.
    * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
    c_common_has_attribute.
    * c-common.h (c_common_has_attribute): New prototype.
    * c-lex.c (init_c_lex): Set cb->has_attribute to
    c_common_has_attribute instead of cb_has_attribute.
    (get_token_no_padding): New function.
    (cb_has_attribute): Renamed to ...
    (c_common_has_attribute): ... this.  No longer static.  Use
    get_token_no_padding, require ()s, don't build TREE_LIST
    unnecessarily, fix up formatting, adjust diagnostics, call
    init_attributes.

    * directives.c (lex_macro_node): Remove __has_attribute__ handling.
    * internal.h (struct spec_node): Remove n__has_attribute__ field.
    (struct lexer_state): Remove in__has_attribute__ field.
    * macro.c (_cpp_builtin_macro_text): Handle BT_HAS_ATTRIBUTE.
    * identifiers.c (_cpp_init_hashtable): Remove __has_attribute__
    handling.
    * init.c (builtin_array): Add __has_attribute and __has_cpp_attribute.
    (cpp_init_special_builtins): Don't initialize __has_attribute
    or __has_cpp_attribute if CLK_ASM or pfile->cb.has_attribute is NULL.
    * traditional.c (enum ls): Remove ls_has_attribute,
    ls_has_attribute_close.
    (_cpp_scan_out_logical_line): Remove __has_attribute__ handling.
    * include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_ATTRIBUTE.
    * pch.c (cpp_read_state): Remove __has_attribute__ handling.
    * expr.c (eval_token): Likewise.
    (parse_has_attribute): Removed.

    * c-c++-common/cpp/pr63831-1.c: New test.
    * c-c++-common/cpp/pr63831-2.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/cpp/pr63831-1.c
    trunk/gcc/testsuite/c-c++-common/cpp/pr63831-2.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.h
    trunk/gcc/c-family/c-cppbuiltin.c
    trunk/gcc/c-family/c-lex.c
    trunk/gcc/c-family/c-ppoutput.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libcpp/ChangeLog
    trunk/libcpp/directives.c
    trunk/libcpp/expr.c
    trunk/libcpp/identifiers.c
    trunk/libcpp/include/cpplib.h
    trunk/libcpp/init.c
    trunk/libcpp/internal.h
    trunk/libcpp/macro.c
    trunk/libcpp/pch.c
    trunk/libcpp/traditional.c


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

* [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM
       [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
                   ` (19 preceding siblings ...)
  2014-12-19 12:21 ` jakub at gcc dot gnu.org
@ 2014-12-19 13:51 ` trippels at gcc dot gnu.org
  20 siblings, 0 replies; 21+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-12-19 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #21 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed. Thanks.


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

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

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-63831-4@http.gcc.gnu.org/bugzilla/>
2014-11-12  9:58 ` [Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM rguenth at gcc dot gnu.org
2014-11-12 16:37 ` iains at gcc dot gnu.org
2014-11-12 16:40 ` iains at gcc dot gnu.org
2014-11-12 18:46 ` emsr at gcc dot gnu.org
2014-11-12 18:47 ` emsr at gcc dot gnu.org
2014-11-12 19:00 ` trippels at gcc dot gnu.org
2014-11-12 19:17 ` emsr at gcc dot gnu.org
2014-11-12 19:21 ` trippels at gcc dot gnu.org
2014-11-12 19:47 ` emsr at gcc dot gnu.org
2014-11-13 15:06 ` emsr at gcc dot gnu.org
2014-11-13 15:22 ` emsr at gcc dot gnu.org
2014-11-13 20:12 ` iains at gcc dot gnu.org
2014-11-22 11:12 ` iains at gcc dot gnu.org
2014-11-22 16:03 ` iains at gcc dot gnu.org
2014-11-22 16:48 ` iains at gcc dot gnu.org
2014-12-03 16:37 ` jakub at gcc dot gnu.org
2014-12-05 13:54 ` jakub at gcc dot gnu.org
2014-12-05 23:00 ` emsr at gcc dot gnu.org
2014-12-06 11:10 ` iains at gcc dot gnu.org
2014-12-19 12:21 ` jakub at gcc dot gnu.org
2014-12-19 13:51 ` trippels 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).