mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 08:19:36 +01:00 
			
		
		
		
	* check that doubleaddr are refused in fpc mode
This commit is contained in:
		
							parent
							
								
									856d87c173
								
							
						
					
					
						commit
						291f66991e
					
				
							
								
								
									
										10
									
								
								tests/tbf/tb0155.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tests/tbf/tb0155.pp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
{ %FAIL }
 | 
			
		||||
 | 
			
		||||
{ @@(x) should be refused in normal mode }
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
 x:function(x:longint):longint;
 | 
			
		||||
 z:pointer;
 | 
			
		||||
begin
 | 
			
		||||
 z:=@@x;
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										10
									
								
								tests/tbf/tb0155a.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tests/tbf/tb0155a.pp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
{ %FAIL }
 | 
			
		||||
 | 
			
		||||
{ addr(@(x)) should be refused in normal mode }
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
 x:function(x:longint):longint;
 | 
			
		||||
 w:pointer;
 | 
			
		||||
begin
 | 
			
		||||
 w:=addr(@x);
 | 
			
		||||
end.
 | 
			
		||||
							
								
								
									
										10
									
								
								tests/tbf/tb0155b.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tests/tbf/tb0155b.pp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
{ %FAIL }
 | 
			
		||||
 | 
			
		||||
{ @(addr(x)) should be refused in normal mode }
 | 
			
		||||
 | 
			
		||||
var
 | 
			
		||||
 x:function(x:longint):longint;
 | 
			
		||||
 v:pointer;
 | 
			
		||||
begin
 | 
			
		||||
 v:=@(addr(x));
 | 
			
		||||
end.
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user