Military compensation is getting a haircut across the board, but Congress singled out general and flag officers for a more extensive trim this year.

For one, the top officers wearing stars will not get the 1 percent pay raise that applies to the rest of the force; this year's defense bill calls for a one-year pay freeze for the generals and admirals.

That will amount to at least a $1,400 cut in pretax income this year for one-star officers.

Buried inside the same law that Congress passed in December is another change that will potentially shave tens of thousands of dollars from the retirement packages of top Pentagon leaders.

Specifically, top generals and admirals will for the first time in years see their monthly retirement checks reflect the legal cap imposed on the highest levels of active-duty basic pay.

Back in 2007, Congress imposed a new ceiling on military pay, Level II of the Executive Schedule, which applies to top-paid officials across the government and prevents military leaders from getting paid more than their civilian counterparts. Last year the cap was $181,500.

That pay cap limited the top officers' biweekly basic pay while on active duty, but it did not apply when calculating retirement pay. The result was a counterintuitive situation that allowed some top officers to take home more money in retirement than they did in their final years in uniform.

For example, in 2014, monthly officer pay was capped at $15,125.10. But according to the military pay tables, a four-star officer with 36 years in service was eligible to receive for $18,821.10 per month. So if that officer just retired, he would see retirement checks amounting to nearly $17,000 monthly because the Pentagon calculated his pension based on the salary on the pay table rather than the officer's actual capped active-duty paycheck.

Now, under the change approved by Congress, top officers' retirement pay will reflect the actual amount of basic pay received when the "high-three" retirement pay figure is calculated, which hinges on average basic pay over a member's final three years of service.

The direct impact on currently serving senior officers will be eased by grandfather clauses. However, over time, that change will cut thousands of dollars each year from the retirement benefits of the military's top officers.

Nevertheless, the top brass — the 100 or so senior officers affected by this change — are still far ahead of where they were a decade ago.

The new law does not scale back the 2007 expansion of the retirement pay multiplier for officers serving beyond 30 years. Prior to that, retirement pay was not adjusted upward beyond 30 years of service, meaning the multiplier of 2.5 percentage points a year would not allow retirement pay to exceed 75 percent of final basic pay.

That changed in 2007 and upward adjustments in retirement began continuing toward 40 years, allowing pension checks to reach 100 percent of final basic pay.

The new rule imposing the Level II Executive Schedule pay cap will not change the way the annual multiplier affects service beyond 30 years.