Commit | Line | Data |
599cee73 |
1 | toke.c AOK |
2 | |
3 | we seem to have lost a few ambiguous warnings!! |
4 | |
5 | |
6 | 1 if $a EQ $b ; |
7 | 1 if $a NE $b ; |
8 | 1 if $a LT $b ; |
9 | 1 if $a GT $b ; |
10 | 1 if $a GE $b ; |
11 | 1 if $a LE $b ; |
12 | $a = <<; |
13 | Use of comma-less variable list is deprecated |
14 | (called 3 times via depcom) |
15 | |
16 | \1 better written as $1 |
4438c4b7 |
17 | use warnings 'syntax' ; |
599cee73 |
18 | s/(abc)/\1/; |
19 | |
20 | warn(warn_nosemi) |
21 | Semicolon seems to be missing |
22 | $a = 1 |
23 | &time ; |
24 | |
25 | |
26 | Reversed %c= operator |
27 | my $a =+ 2 ; |
28 | $a =- 2 ; |
29 | $a =* 2 ; |
30 | $a =% 2 ; |
31 | $a =& 2 ; |
32 | $a =. 2 ; |
33 | $a =^ 2 ; |
34 | $a =| 2 ; |
35 | $a =< 2 ; |
36 | $a =/ 2 ; |
37 | |
38 | Multidimensional syntax %.*s not supported |
39 | my $a = $a[1,2] ; |
40 | |
41 | You need to quote \"%s\"" |
42 | sub fred {} ; $SIG{TERM} = fred; |
43 | |
44 | Scalar value %.*s better written as $%.*s" |
45 | @a[3] = 2; |
46 | @a{3} = 2; |
47 | |
48 | Can't use \\%c to mean $%c in expression |
49 | $_ = "ab" ; s/(ab)/\1/e; |
50 | |
51 | Unquoted string "abc" may clash with future reserved word at - line 3. |
52 | warn(warn_reserved |
53 | $a = abc; |
54 | |
55 | chmod: mode argument is missing initial 0 |
56 | chmod 3; |
57 | |
58 | Possible attempt to separate words with commas |
59 | @a = qw(a, b, c) ; |
60 | |
61 | Possible attempt to put comments in qw() list |
62 | @a = qw(a b # c) ; |
63 | |
64 | umask: argument is missing initial 0 |
65 | umask 3; |
66 | |
67 | %s (...) interpreted as function |
68 | print ("") |
69 | printf ("") |
70 | sort ("") |
71 | |
72 | Ambiguous use of %c{%s%s} resolved to %c%s%s |
73 | $a = ${time[2]} |
74 | $a = ${time{2}} |
75 | |
76 | |
77 | Ambiguous use of %c{%s} resolved to %c%s |
78 | $a = ${time} |
79 | sub fred {} $a = ${fred} |
80 | |
81 | Misplaced _ in number |
82 | $a = 1_2; |
83 | $a = 1_2345_6; |
84 | |
85 | Bareword \"%s\" refers to nonexistent package |
86 | $a = FRED:: ; |
87 | |
88 | Ambiguous call resolved as CORE::%s(), qualify as such or use & |
89 | sub time {} |
90 | my $a = time() |
91 | |
92 | Use of \\x{} without utf8 declaration |
93 | $_ = " \x{123} " ; |
94 | |
95 | |
96 | \x%.*s will produce malformed UTF-8 character; use \x{%.*s} for that |
97 | use utf8 ; |
98 | $_ = "\xffe" |
767a6a26 |
99 | |
100 | Unrecognized escape \\%c passed through |
101 | $a = "\m" ; |
102 | |
103 | %s number > %s non-portable |
104 | my $a = 0b011111111111111111111111111111110 ; |
105 | $a = 0b011111111111111111111111111111111 ; |
106 | $a = 0b111111111111111111111111111111111 ; |
107 | $a = 0x0fffffffe ; |
108 | $a = 0x0ffffffff ; |
109 | $a = 0x1ffffffff ; |
110 | $a = 0037777777776 ; |
111 | $a = 0037777777777 ; |
112 | $a = 0047777777777 ; |
113 | |
114 | Integer overflow in binary number |
115 | my $a = 0b011111111111111111111111111111110 ; |
116 | $a = 0b011111111111111111111111111111111 ; |
117 | $a = 0b111111111111111111111111111111111 ; |
118 | $a = 0x0fffffffe ; |
119 | $a = 0x0ffffffff ; |
120 | $a = 0x1ffffffff ; |
121 | $a = 0037777777776 ; |
122 | $a = 0037777777777 ; |
123 | $a = 0047777777777 ; |
599cee73 |
124 | |
0453d815 |
125 | Mandatory Warnings |
126 | ------------------ |
127 | Use of "%s" without parentheses is ambiguous [check_uni] |
128 | rand + 4 |
129 | |
130 | Ambiguous use of -%s resolved as -&%s() [yylex] |
131 | sub fred {} ; - fred ; |
132 | |
133 | Precedence problem: open %.*s should be open(%.*s) [yylex] |
134 | open FOO || die; |
135 | |
136 | Operator or semicolon missing before %c%s [yylex] |
137 | Ambiguous use of %c resolved as operator %c |
138 | *foo *foo |
139 | |
599cee73 |
140 | __END__ |
141 | # toke.c |
4438c4b7 |
142 | use warnings 'deprecated' ; |
599cee73 |
143 | 1 if $a EQ $b ; |
144 | 1 if $a NE $b ; |
145 | 1 if $a GT $b ; |
146 | 1 if $a LT $b ; |
147 | 1 if $a GE $b ; |
148 | 1 if $a LE $b ; |
4438c4b7 |
149 | no warnings 'deprecated' ; |
0453d815 |
150 | 1 if $a EQ $b ; |
151 | 1 if $a NE $b ; |
152 | 1 if $a GT $b ; |
153 | 1 if $a LT $b ; |
154 | 1 if $a GE $b ; |
155 | 1 if $a LE $b ; |
599cee73 |
156 | EXPECT |
157 | Use of EQ is deprecated at - line 3. |
158 | Use of NE is deprecated at - line 4. |
159 | Use of GT is deprecated at - line 5. |
160 | Use of LT is deprecated at - line 6. |
161 | Use of GE is deprecated at - line 7. |
162 | Use of LE is deprecated at - line 8. |
163 | ######## |
164 | # toke.c |
4438c4b7 |
165 | use warnings 'deprecated' ; |
599cee73 |
166 | format STDOUT = |
167 | @<<< @||| @>>> @>>> |
168 | $a $b "abc" 'def' |
169 | . |
4438c4b7 |
170 | no warnings 'deprecated' ; |
0453d815 |
171 | format STDOUT = |
172 | @<<< @||| @>>> @>>> |
173 | $a $b "abc" 'def' |
174 | . |
599cee73 |
175 | EXPECT |
176 | Use of comma-less variable list is deprecated at - line 5. |
177 | Use of comma-less variable list is deprecated at - line 5. |
178 | Use of comma-less variable list is deprecated at - line 5. |
599cee73 |
179 | ######## |
180 | # toke.c |
4438c4b7 |
181 | use warnings 'deprecated' ; |
599cee73 |
182 | $a = <<; |
183 | |
4438c4b7 |
184 | no warnings 'deprecated' ; |
0453d815 |
185 | $a = <<; |
186 | |
599cee73 |
187 | EXPECT |
188 | Use of bare << to mean <<"" is deprecated at - line 3. |
189 | ######## |
190 | # toke.c |
4438c4b7 |
191 | use warnings 'syntax' ; |
599cee73 |
192 | s/(abc)/\1/; |
4438c4b7 |
193 | no warnings 'syntax' ; |
0453d815 |
194 | s/(abc)/\1/; |
599cee73 |
195 | EXPECT |
196 | \1 better written as $1 at - line 3. |
197 | ######## |
198 | # toke.c |
4438c4b7 |
199 | use warnings 'semicolon' ; |
599cee73 |
200 | $a = 1 |
201 | &time ; |
4438c4b7 |
202 | no warnings 'semicolon' ; |
0453d815 |
203 | $a = 1 |
204 | &time ; |
599cee73 |
205 | EXPECT |
206 | Semicolon seems to be missing at - line 3. |
207 | ######## |
208 | # toke.c |
e4050d25 |
209 | BEGIN { |
210 | # Scalars leaked: due to syntax errors |
211 | $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; |
212 | } |
4438c4b7 |
213 | use warnings 'syntax' ; |
599cee73 |
214 | my $a =+ 2 ; |
215 | $a =- 2 ; |
216 | $a =* 2 ; |
217 | $a =% 2 ; |
218 | $a =& 2 ; |
219 | $a =. 2 ; |
220 | $a =^ 2 ; |
221 | $a =| 2 ; |
222 | $a =< 2 ; |
223 | $a =/ 2 ; |
224 | EXPECT |
e4050d25 |
225 | Reversed += operator at - line 7. |
226 | Reversed -= operator at - line 8. |
227 | Reversed *= operator at - line 9. |
228 | Reversed %= operator at - line 10. |
229 | Reversed &= operator at - line 11. |
230 | Reversed .= operator at - line 12. |
231 | syntax error at - line 12, near "=." |
232 | Reversed ^= operator at - line 13. |
233 | syntax error at - line 13, near "=^" |
234 | Reversed |= operator at - line 14. |
235 | syntax error at - line 14, near "=|" |
236 | Reversed <= operator at - line 15. |
237 | Unterminated <> operator at - line 15. |
599cee73 |
238 | ######## |
239 | # toke.c |
0453d815 |
240 | BEGIN { |
241 | # Scalars leaked: due to syntax errors |
242 | $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; |
243 | } |
4438c4b7 |
244 | no warnings 'syntax' ; |
0453d815 |
245 | my $a =+ 2 ; |
246 | $a =- 2 ; |
247 | $a =* 2 ; |
248 | $a =% 2 ; |
249 | $a =& 2 ; |
250 | $a =. 2 ; |
251 | $a =^ 2 ; |
252 | $a =| 2 ; |
253 | $a =< 2 ; |
254 | $a =/ 2 ; |
255 | EXPECT |
256 | syntax error at - line 12, near "=." |
257 | syntax error at - line 13, near "=^" |
258 | syntax error at - line 14, near "=|" |
259 | Unterminated <> operator at - line 15. |
260 | ######## |
261 | # toke.c |
4438c4b7 |
262 | use warnings 'syntax' ; |
599cee73 |
263 | my $a = $a[1,2] ; |
4438c4b7 |
264 | no warnings 'syntax' ; |
0453d815 |
265 | my $a = $a[1,2] ; |
599cee73 |
266 | EXPECT |
267 | Multidimensional syntax $a[1,2] not supported at - line 3. |
268 | ######## |
269 | # toke.c |
4438c4b7 |
270 | use warnings 'syntax' ; |
599cee73 |
271 | sub fred {} ; $SIG{TERM} = fred; |
4438c4b7 |
272 | no warnings 'syntax' ; |
0453d815 |
273 | $SIG{TERM} = fred; |
599cee73 |
274 | EXPECT |
275 | You need to quote "fred" at - line 3. |
276 | ######## |
277 | # toke.c |
4438c4b7 |
278 | use warnings 'syntax' ; |
599cee73 |
279 | @a[3] = 2; |
280 | @a{3} = 2; |
4438c4b7 |
281 | no warnings 'syntax' ; |
0453d815 |
282 | @a[3] = 2; |
283 | @a{3} = 2; |
599cee73 |
284 | EXPECT |
285 | Scalar value @a[3] better written as $a[3] at - line 3. |
286 | Scalar value @a{3} better written as $a{3} at - line 4. |
287 | ######## |
288 | # toke.c |
4438c4b7 |
289 | use warnings 'syntax' ; |
599cee73 |
290 | $_ = "ab" ; |
291 | s/(ab)/\1/e; |
4438c4b7 |
292 | no warnings 'syntax' ; |
0453d815 |
293 | $_ = "ab" ; |
294 | s/(ab)/\1/e; |
599cee73 |
295 | EXPECT |
296 | Can't use \1 to mean $1 in expression at - line 4. |
297 | ######## |
298 | # toke.c |
4438c4b7 |
299 | use warnings 'reserved' ; |
599cee73 |
300 | $a = abc; |
4438c4b7 |
301 | no warnings 'reserved' ; |
0453d815 |
302 | $a = abc; |
599cee73 |
303 | EXPECT |
304 | Unquoted string "abc" may clash with future reserved word at - line 3. |
305 | ######## |
306 | # toke.c |
4438c4b7 |
307 | use warnings 'octal' ; |
599cee73 |
308 | chmod 3; |
4438c4b7 |
309 | no warnings 'octal' ; |
0453d815 |
310 | chmod 3; |
599cee73 |
311 | EXPECT |
4438c4b7 |
312 | chmod: mode argument is missing initial 0 at - line 3. |
599cee73 |
313 | ######## |
314 | # toke.c |
4438c4b7 |
315 | use warnings 'syntax' ; |
599cee73 |
316 | @a = qw(a, b, c) ; |
4438c4b7 |
317 | no warnings 'syntax' ; |
0453d815 |
318 | @a = qw(a, b, c) ; |
599cee73 |
319 | EXPECT |
320 | Possible attempt to separate words with commas at - line 3. |
321 | ######## |
322 | # toke.c |
4438c4b7 |
323 | use warnings 'syntax' ; |
599cee73 |
324 | @a = qw(a b #) ; |
4438c4b7 |
325 | no warnings 'syntax' ; |
0453d815 |
326 | @a = qw(a b #) ; |
599cee73 |
327 | EXPECT |
328 | Possible attempt to put comments in qw() list at - line 3. |
329 | ######## |
330 | # toke.c |
4438c4b7 |
331 | use warnings 'octal' ; |
599cee73 |
332 | umask 3; |
4438c4b7 |
333 | no warnings 'octal' ; |
0453d815 |
334 | umask 3; |
599cee73 |
335 | EXPECT |
4438c4b7 |
336 | umask: argument is missing initial 0 at - line 3. |
599cee73 |
337 | ######## |
338 | # toke.c |
4438c4b7 |
339 | use warnings 'syntax' ; |
599cee73 |
340 | print ("") |
341 | EXPECT |
342 | print (...) interpreted as function at - line 3. |
343 | ######## |
344 | # toke.c |
4438c4b7 |
345 | no warnings 'syntax' ; |
0453d815 |
346 | print ("") |
347 | EXPECT |
348 | |
349 | ######## |
350 | # toke.c |
4438c4b7 |
351 | use warnings 'syntax' ; |
599cee73 |
352 | printf ("") |
353 | EXPECT |
354 | printf (...) interpreted as function at - line 3. |
355 | ######## |
356 | # toke.c |
4438c4b7 |
357 | no warnings 'syntax' ; |
0453d815 |
358 | printf ("") |
359 | EXPECT |
360 | |
361 | ######## |
362 | # toke.c |
4438c4b7 |
363 | use warnings 'syntax' ; |
599cee73 |
364 | sort ("") |
365 | EXPECT |
366 | sort (...) interpreted as function at - line 3. |
367 | ######## |
368 | # toke.c |
4438c4b7 |
369 | no warnings 'syntax' ; |
0453d815 |
370 | sort ("") |
371 | EXPECT |
372 | |
373 | ######## |
374 | # toke.c |
4438c4b7 |
375 | use warnings 'ambiguous' ; |
599cee73 |
376 | $a = ${time[2]}; |
4438c4b7 |
377 | no warnings 'ambiguous' ; |
0453d815 |
378 | $a = ${time[2]}; |
599cee73 |
379 | EXPECT |
380 | Ambiguous use of ${time[...]} resolved to $time[...] at - line 3. |
381 | ######## |
382 | # toke.c |
4438c4b7 |
383 | use warnings 'ambiguous' ; |
599cee73 |
384 | $a = ${time{2}}; |
385 | EXPECT |
386 | Ambiguous use of ${time{...}} resolved to $time{...} at - line 3. |
387 | ######## |
388 | # toke.c |
4438c4b7 |
389 | no warnings 'ambiguous' ; |
0453d815 |
390 | $a = ${time{2}}; |
391 | EXPECT |
392 | |
393 | ######## |
394 | # toke.c |
4438c4b7 |
395 | use warnings 'ambiguous' ; |
599cee73 |
396 | $a = ${time} ; |
4438c4b7 |
397 | no warnings 'ambiguous' ; |
0453d815 |
398 | $a = ${time} ; |
599cee73 |
399 | EXPECT |
400 | Ambiguous use of ${time} resolved to $time at - line 3. |
401 | ######## |
402 | # toke.c |
4438c4b7 |
403 | use warnings 'ambiguous' ; |
599cee73 |
404 | sub fred {} |
405 | $a = ${fred} ; |
4438c4b7 |
406 | no warnings 'ambiguous' ; |
0453d815 |
407 | $a = ${fred} ; |
599cee73 |
408 | EXPECT |
409 | Ambiguous use of ${fred} resolved to $fred at - line 4. |
410 | ######## |
411 | # toke.c |
4438c4b7 |
412 | use warnings 'syntax' ; |
599cee73 |
413 | $a = 1_2; |
414 | $a = 1_2345_6; |
4438c4b7 |
415 | no warnings 'syntax' ; |
0453d815 |
416 | $a = 1_2; |
417 | $a = 1_2345_6; |
599cee73 |
418 | EXPECT |
419 | Misplaced _ in number at - line 3. |
420 | Misplaced _ in number at - line 4. |
421 | Misplaced _ in number at - line 4. |
422 | ######## |
423 | # toke.c |
4438c4b7 |
424 | use warnings 'unsafe' ; |
60e6418e |
425 | #line 25 "bar" |
599cee73 |
426 | $a = FRED:: ; |
4438c4b7 |
427 | no warnings 'unsafe' ; |
0453d815 |
428 | #line 25 "bar" |
429 | $a = FRED:: ; |
599cee73 |
430 | EXPECT |
60e6418e |
431 | Bareword "FRED::" refers to nonexistent package at bar line 25. |
599cee73 |
432 | ######## |
433 | # toke.c |
4438c4b7 |
434 | use warnings 'ambiguous' ; |
599cee73 |
435 | sub time {} |
0453d815 |
436 | my $a = time() ; |
4438c4b7 |
437 | no warnings 'ambiguous' ; |
0453d815 |
438 | my $b = time() ; |
599cee73 |
439 | EXPECT |
440 | Ambiguous call resolved as CORE::time(), qualify as such or use & at - line 4. |
441 | ######## |
442 | # toke.c |
4438c4b7 |
443 | use warnings 'utf8' ; |
60e6418e |
444 | eval <<'EOE'; |
445 | { |
446 | #line 30 "foo" |
447 | $_ = " \x{123} " ; |
448 | } |
449 | EOE |
599cee73 |
450 | EXPECT |
60e6418e |
451 | Use of \x{} without utf8 declaration at foo line 30. |
599cee73 |
452 | ######## |
453 | # toke.c |
4438c4b7 |
454 | no warnings 'utf8' ; |
0453d815 |
455 | eval <<'EOE'; |
456 | { |
457 | #line 30 "foo" |
458 | $_ = " \x{123} " ; |
459 | } |
460 | EOE |
461 | EXPECT |
462 | |
463 | ######## |
464 | # toke.c |
4438c4b7 |
465 | use warnings 'utf8' ; |
599cee73 |
466 | use utf8 ; |
467 | $_ = " \xffe " ; |
4438c4b7 |
468 | no warnings 'utf8' ; |
0453d815 |
469 | $_ = " \xffe " ; |
599cee73 |
470 | EXPECT |
471 | \xff will produce malformed UTF-8 character; use \x{ff} for that at - line 4. |
0453d815 |
472 | ######## |
473 | # toke.c |
474 | my $a = rand + 4 ; |
475 | EXPECT |
476 | Warning: Use of "rand" without parens is ambiguous at - line 2. |
477 | ######## |
478 | # toke.c |
479 | $^W = 0 ; |
480 | my $a = rand + 4 ; |
481 | { |
4438c4b7 |
482 | no warnings 'ambiguous' ; |
0453d815 |
483 | $a = rand + 4 ; |
4438c4b7 |
484 | use warnings 'ambiguous' ; |
0453d815 |
485 | $a = rand + 4 ; |
486 | } |
487 | $a = rand + 4 ; |
488 | EXPECT |
489 | Warning: Use of "rand" without parens is ambiguous at - line 3. |
490 | Warning: Use of "rand" without parens is ambiguous at - line 8. |
491 | Warning: Use of "rand" without parens is ambiguous at - line 10. |
492 | ######## |
493 | # toke.c |
494 | sub fred {}; |
495 | -fred ; |
496 | EXPECT |
497 | Ambiguous use of -fred resolved as -&fred() at - line 3. |
498 | ######## |
499 | # toke.c |
500 | $^W = 0 ; |
501 | sub fred {} ; |
502 | -fred ; |
503 | { |
4438c4b7 |
504 | no warnings 'ambiguous' ; |
0453d815 |
505 | -fred ; |
4438c4b7 |
506 | use warnings 'ambiguous' ; |
0453d815 |
507 | -fred ; |
508 | } |
509 | -fred ; |
510 | EXPECT |
511 | Ambiguous use of -fred resolved as -&fred() at - line 4. |
512 | Ambiguous use of -fred resolved as -&fred() at - line 9. |
513 | Ambiguous use of -fred resolved as -&fred() at - line 11. |
514 | ######## |
515 | # toke.c |
516 | open FOO || time; |
517 | EXPECT |
518 | Precedence problem: open FOO should be open(FOO) at - line 2. |
519 | ######## |
520 | # toke.c |
521 | $^W = 0 ; |
522 | open FOO || time; |
523 | { |
4438c4b7 |
524 | no warnings 'ambiguous' ; |
0453d815 |
525 | open FOO || time; |
4438c4b7 |
526 | use warnings 'ambiguous' ; |
0453d815 |
527 | open FOO || time; |
528 | } |
529 | open FOO || time; |
530 | EXPECT |
531 | Precedence problem: open FOO should be open(FOO) at - line 3. |
532 | Precedence problem: open FOO should be open(FOO) at - line 8. |
533 | Precedence problem: open FOO should be open(FOO) at - line 10. |
534 | ######## |
535 | # toke.c |
536 | $^W = 0 ; |
537 | *foo *foo ; |
538 | { |
4438c4b7 |
539 | no warnings 'ambiguous' ; |
0453d815 |
540 | *foo *foo ; |
4438c4b7 |
541 | use warnings 'ambiguous' ; |
0453d815 |
542 | *foo *foo ; |
543 | } |
544 | *foo *foo ; |
545 | EXPECT |
546 | Operator or semicolon missing before *foo at - line 3. |
547 | Ambiguous use of * resolved as operator * at - line 3. |
548 | Operator or semicolon missing before *foo at - line 8. |
549 | Ambiguous use of * resolved as operator * at - line 8. |
550 | Operator or semicolon missing before *foo at - line 10. |
551 | Ambiguous use of * resolved as operator * at - line 10. |
767a6a26 |
552 | ######## |
553 | # toke.c |
554 | use warnings 'unsafe' ; |
555 | my $a = "\m" ; |
556 | no warnings 'unsafe' ; |
557 | $a = "\m" ; |
558 | EXPECT |
559 | Unrecognized escape \m passed through at - line 3. |
560 | ######## |
561 | # toke.c |
562 | use warnings 'portable' ; |
563 | my $a = 0b011111111111111111111111111111110 ; |
564 | $a = 0b011111111111111111111111111111111 ; |
565 | $a = 0b111111111111111111111111111111111 ; |
566 | $a = 0x0fffffffe ; |
567 | $a = 0x0ffffffff ; |
568 | $a = 0x1ffffffff ; |
569 | $a = 0037777777776 ; |
570 | $a = 0037777777777 ; |
571 | $a = 0047777777777 ; |
572 | no warnings 'portable' ; |
573 | $a = 0b011111111111111111111111111111110 ; |
574 | $a = 0b011111111111111111111111111111111 ; |
575 | $a = 0b111111111111111111111111111111111 ; |
576 | $a = 0x0fffffffe ; |
577 | $a = 0x0ffffffff ; |
578 | $a = 0x1ffffffff ; |
579 | $a = 0037777777776 ; |
580 | $a = 0037777777777 ; |
581 | $a = 0047777777777 ; |
582 | EXPECT |
583 | Binary number > 0b11111111111111111111111111111111 non-portable at - line 5. |
584 | Hexadecimal number > 0xffffffff non-portable at - line 8. |
585 | Octal number > 037777777777 non-portable at - line 11. |
586 | ######## |
587 | # toke.c |
588 | use warnings 'overflow' ; |
589 | my $a = 0b011111111111111111111111111111110 ; |
590 | $a = 0b011111111111111111111111111111111 ; |
15041a67 |
591 | $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ; |
767a6a26 |
592 | $a = 0x0fffffffe ; |
593 | $a = 0x0ffffffff ; |
15041a67 |
594 | $a = 0x10000000000000000 ; |
767a6a26 |
595 | $a = 0037777777776 ; |
596 | $a = 0037777777777 ; |
15041a67 |
597 | $a = 002000000000000000000000; |
767a6a26 |
598 | no warnings 'overflow' ; |
599 | $a = 0b011111111111111111111111111111110 ; |
600 | $a = 0b011111111111111111111111111111111 ; |
15041a67 |
601 | $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ; |
767a6a26 |
602 | $a = 0x0fffffffe ; |
603 | $a = 0x0ffffffff ; |
15041a67 |
604 | $a = 0x10000000000000000 ; |
767a6a26 |
605 | $a = 0037777777776 ; |
606 | $a = 0037777777777 ; |
15041a67 |
607 | $a = 002000000000000000000000; |
767a6a26 |
608 | EXPECT |
609 | Integer overflow in binary number at - line 5. |
610 | Integer overflow in hexadecimal number at - line 8. |
611 | Integer overflow in octal number at - line 11. |