This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/18462] New: macro deprecation

            Bug ID: 18462
           Summary: macro deprecation
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

To-be-deprecated tapset functions or probes are being wrapped in %( systemtap_v
<= "1.3" %?    function foo() {}   %)

Attempt to do this with library macro results in "parse error: library macro
file contains non-@define construct" in pass 1, where no conditionals are being

Following is an attempt to solve the issue uncleanly using intentional syntax

> =======                                                                          
> @define __int32_compat(arg)                                                     
> %(                                                                              
>     %( systemtap_v <= "2.5" %?                                                  
>         %( CONFIG_64BIT == "y" %?                                               
>             (%{ /* pure */ _stp_is_compat_task() %} ? __int32(@arg) : @arg)        
>         %:                                                                      
>             (__int32(@arg))                                                     
>         %)                                                                      
>     %:                                                                          
>         *** ERROR ***                                                           
>     %)                                                                          
> %)                                                                               
> =======

This appears to be syntactically acceptable, but here, systemtap_v <=
"whatever" always effectively evaluates as true (but e.g. "aa" <= "a" would
evaluate as false). Not sure whether it's a bug or feature, but certainly not a
way to go.

So I think we're missing mechanism for macro deprecation.

You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]