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