🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by "Douglas C. Schmidt" Thu, 19 Jan 1989 10:27
Bug report, and FIX!
#1646
Author: "Douglas C. Schmidt"
Date: Thu, 19 Jan 1989 10:27
54 lines
2481 bytes
Hi,

   There is currently a bug in the g++ 1.32 cplus-parse.y file.
It causes a segmentation fault with the following construct:

----------------------------------------
main () {
   int j = ({1;});
}
----------------------------------------

   I've found the problem with this, and included the patches
for cplus-parse.y below.

   Doug

----------------------------------------
*** cplus-parse.y.~1~	Thu Jan 19 02:24:22 1989
--- cplus-parse.y	Thu Jan 19 02:21:14 1989
***************
*** 641,647 ****
            compstmt ')'
                  { if (pedantic)
                      warning ("ANSI C forbids braced-groups within expressions");
!                   expand_end_stmt_expr ($<ttype>2); }
          | primary '(' exprlist ')'
                  { $$ = build_x_function_call ($1, $3, current_class_decl); }
          | primary '[' expr ']'
--- 641,647 ----
            compstmt ')'
                  { if (pedantic)
                      warning ("ANSI C forbids braced-groups within expressions");
!                   $$ = expand_end_stmt_expr ($<ttype>2); }
          | primary '(' exprlist ')'
                  { $$ = build_x_function_call ($1, $3, current_class_decl); }
          | primary '[' expr ']'
***************
*** 953,959 ****
            compstmt ')'
                  { if (pedantic)
                      warning ("ANSI C forbids braced-groups within expressions");
!                   expand_end_stmt_expr ($<ttype>2); }
          | primary_no_id '(' exprlist ')'
                  { $$ = build_x_function_call ($1, $3, current_class_decl); }
          | primary_no_id '[' expr ']'
--- 953,959 ----
            compstmt ')'
                  { if (pedantic)
                      warning ("ANSI C forbids braced-groups within expressions");
!                   $$ = expand_end_stmt_expr ($<ttype>2); }
          | primary_no_id '(' exprlist ')'
                  { $$ = build_x_function_call ($1, $3, current_class_decl); }
          | primary_no_id '[' expr ']'
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads