Skip to content

Conversation

@mauke
Copy link
Contributor

@mauke mauke commented Apr 28, 2025

This fixes an oversight where catch (my $e) would run into generic error code that was not prepared to handle catch (and hence complain about redeclaring my in our, like our (my $x)).


  • This set of changes requires a perldelta entry, and it is included.

@tonycoz
Copy link
Contributor

tonycoz commented Apr 28, 2025

(This does not happen automatically because the changes to 'perly.y'
land in 'perly.act', which 'perly.c' includes but 'make' knows nothing
about. Thus, even if 'perly.act' has a newer mtime, 'make' won't update
'perly.o' if it already exists.)

Don't you get dependencies in makefile after make regen make depend for these, I see:

perly$(OBJ_EXT): perlvars.h
perly$(OBJ_EXT): perly.act
perly$(OBJ_EXT): perly.c
perly$(OBJ_EXT): perly.h
perly$(OBJ_EXT): perly.tab
perly$(OBJ_EXT): perly.y
perly$(OBJ_EXT): pp.h

I changed a message in perly.y just before the regen_perly below:

tony@venus:.../git/perl6$ make perly.o
tony@venus:.../git/perl6$ make regen_perly
perl regen_perly.pl
Changed: perly.act perly.tab perly.h
tony@venus:.../git/perl6$ make perly.o
cc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c99 -O2 -g -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -Wno-use-after-free perly.c

@tonycoz
Copy link
Contributor

tonycoz commented Apr 28, 2025

File times before:

-rw-r--r-- 1 tony tony  66795 Apr 28 08:13 perly.act
-rw-r--r-- 1 tony tony  19138 Jul 25  2024 perly.c
-rw-r--r-- 1 tony tony  10182 Apr 28 08:13 perly.h
-rw-r--r-- 1 tony tony 272864 Apr 28 11:32 perly.o
-rw-r--r-- 1 tony tony 106585 Apr 28 08:13 perly.tab
-rw-r--r-- 1 tony tony  50541 Apr 28 08:13 perly.y

after:

-rw-r--r-- 1 tony tony  66796 Apr 28 11:34 perly.act
-rw-r--r-- 1 tony tony  19138 Jul 25  2024 perly.c
-rw-r--r-- 1 tony tony  10182 Apr 28 11:34 perly.h
-rw-r--r-- 1 tony tony 272864 Apr 28 11:34 perly.o
-rw-r--r-- 1 tony tony 106585 Apr 28 11:34 perly.tab
-rw-r--r-- 1 tony tony  50541 Apr 28 11:40 perly.y

@tonycoz
Copy link
Contributor

tonycoz commented Apr 28, 2025

Looks good otherwise.

@mauke mauke force-pushed the fix-23222-catch-declarator branch from 7a52a1d to 54a93b5 Compare April 28, 2025 02:11
@mauke
Copy link
Contributor Author

mauke commented Apr 28, 2025

I've dropped the changes to regen_perly.pl. Whatever was going on with my setup, it seems to be gone after git clean -dfx + rebuild.

Copy link
Contributor

@leonerd leonerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change all looks good, but I think it could do with adding a new test of the new message to t/lib/croak/op.

@mauke mauke force-pushed the fix-23222-catch-declarator branch from 54a93b5 to 6f8434f Compare April 28, 2025 16:38
@mauke
Copy link
Contributor Author

mauke commented Apr 28, 2025

Code change all looks good, but I think it could do with adding a new test of the new message to t/lib/croak/op.

I've added some tests to t/lib/croak/toke, next to the existing our (my $x) tests.

@mauke mauke requested a review from leonerd April 28, 2025 16:40
Copy link
Contributor

@leonerd leonerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ap ap added the defer-next-dev This PR should not be merged yet, but await the next development cycle label May 1, 2025
@jkeenan jkeenan removed the defer-next-dev This PR should not be merged yet, but await the next development cycle label Jul 10, 2025
@mauke mauke force-pushed the fix-23222-catch-declarator branch from 6f8434f to 6cb2c8f Compare July 28, 2025 21:03
@mauke mauke merged commit d1bb394 into Perl:blead Jul 28, 2025
33 checks passed
@mauke mauke deleted the fix-23222-catch-declarator branch July 28, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants