Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:28:46+00:00 2026-06-08T14:28:46+00:00

Look at the the following code snippet. It was written in 2005 but I

  • 0

Look at the the following code snippet. It was written in 2005 but I am compiling it with latest gcc.

xln_merge_nodes_without_lindo(coeff, cand_node_array, match1_array, match2_array)
  sm_matrix *coeff;
  array_t *cand_node_array, *match1_array, *match2_array;
{ 
  node_t *n1, *n2;
  sm_row *row1, *row2;
  static sm_row *xln_merge_find_neighbor_of_row1_with_minimum_neighbors();

  while (TRUE) {
      row1 = sm_shortest_row(coeff);
      if (row1 == NIL (sm_row)) return;
      n1 = array_fetch(node_t *, cand_node_array, row1->row_num);
      row2 = xln_merge_find_neighbor_of_row1_with_minimum_neighbors(row1, coeff);
      n2 = array_fetch(node_t *, cand_node_array, row2->row_num);
      array_insert_last(node_t *, match1_array, n1);
      array_insert_last(node_t *, match2_array, n2);
      xln_merge_update_neighbor_info(coeff, row1, row2);
  }
}

While compiling,it complains,

xln_merge.c:299:18: error: invalid storage class for function ‘xln_merge_find_neighbor_of_row1_with_minimum_neighbors’

(xln_merger.c:299 is line 3 here after definition starts).

Line 3 function definition seems to be a function declaration (isn’t it???). Does the programmer intended to write a function pointer (static)? Or some syntax has changed over the time in c why this is not compiling.

This code is from sis package here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:28:47+00:00Added an answer on June 8, 2026 at 2:28 pm

    Though uncommon, it’s completely valid and standard to declare a function inside another one. However the static modifier makes no sense in a declaration without a body, and you can’t* define your function inside another function.

    Does the programmer intended to write a function pointer (static)?

    I can’t know the original programmer’s intentions but in no way can that be a function pointer since there’s no assignment to it.


    * Actually you can as a GCC extension

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Take a look that the following code snippet: A a = null try {
Let's look at the following code snippet in Java. package division; import java.math.BigDecimal; final
Please look through the following code snippet - HTML <div class=aclass> <h1>This is heading
Let's look at the following code snippet in Java. package trickyjava; class A {
Let's look at the following code snippet in Java. package demo; import java.util.Calendar; final
Let's look at the following simple code snippet in Java. interface Sum { abstract
Have a look at the following code snippet... File1.h void somefunc(int); File1.c #include File1.h
HI take a look at the following code snippet on Python 2.7: # -*-
Look at the following code snippet: <?php class A { function fn() { print
Look at the following code snippet in Java. final public class Main { public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.